r96144 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96143‎ | r96144 | r96145 >
Date:19:35, 2 September 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r95674 - restored compatibility to versions of MediaWiki from before the change to EditPage::internalAttemptSave()
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_FormEdit.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php
@@ -308,7 +308,12 @@
309309 // Try to save the page!
310310 $resultDetails = array();
311311 $saveResult = $editor->internalAttemptSave( $resultDetails );
312 - $saveResultCode = $saveResult->value;
 312+ if ( method_exists( $saveResult, 'value' ) ) {
 313+ $saveResultCode = $saveResult->value;
 314+ } else {
 315+ // Compatibility with MW < 1.19
 316+ $saveResultCode = $saveResult;
 317+ }
313318
314319 if ( ( $saveResultCode == EditPage::AS_HOOK_ERROR || $saveResultCode == EditPage::AS_HOOK_ERROR_EXPECTED ) && $redirectOnError ) {
315320

Follow-up revisions

RevisionCommit summaryAuthorDate
r96149Fix for r96144 - a (hopefully) correct check this timeyaron21:02, 2 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95674Followup r95562: update callers to internalAttemptSave() in extensions. Thank...catrope16:06, 29 August 2011