r95674 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95673‎ | r95674 | r95675 >
Date:16:06, 29 August 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r95562: update callers to internalAttemptSave() in extensions. Thanks to Nikerabbit for pointing out this oversight to me
Modified paths:
  • /trunk/extensions/Commentbox/SpecialAddComment_body.php (modified) (history)
  • /trunk/extensions/CreateRedirect/CreateRedirect.body.php (modified) (history)
  • /trunk/extensions/SemanticForms/specials/SF_FormEdit.php (modified) (history)
  • /trunk/extensions/TalkHere/TalkHereHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Commentbox/SpecialAddComment_body.php
@@ -84,7 +84,8 @@
8585 $ep->setContextTitle( $title );
8686 $ep->importFormData( $request );
8787 $details = array(); // Passed by ref
88 - $retval = $ep->internalAttemptSave( $details );
 88+ $status = $ep->internalAttemptSave( $details );
 89+ $retval = $status->value;
8990
9091 switch ( $retval ) {
9192 case EditPage::AS_SUCCESS_UPDATE:
Index: trunk/extensions/CreateRedirect/CreateRedirect.body.php
@@ -125,7 +125,8 @@
126126 }
127127
128128 $resultDetails = false;
129 - $value = $crEdit->internalAttemptSave( $resultDetails, $wgUser->isAllowed( 'bot' ) && $wgRequest->getBool( 'bot', true ) );
 129+ $status = $crEdit->internalAttemptSave( $resultDetails, $wgUser->isAllowed( 'bot' ) && $wgRequest->getBool( 'bot', true ) );
 130+ $value = $status->value;
130131
131132 if ( $value == EditPage::AS_SUCCESS_UPDATE || $value == EditPage::AS_SUCCESS_NEW_ARTICLE ) {
132133 $wgOut->wrapWikiMsg(
Index: trunk/extensions/TalkHere/TalkHereHooks.php
@@ -333,7 +333,7 @@
334334
335335 public function internalAttemptSave( &$result, $bot = false ) {
336336 $res = parent::internalAttemptSave( $result, $bot );
337 - $this->code = $res;
 337+ $this->code = $res->value;
338338 if ( isset( $result['sectionanchor'] ) ) {
339339 $this->sectionanchor = $result['sectionanchor'];
340340 }
Index: trunk/extensions/SemanticForms/specials/SF_FormEdit.php
@@ -307,7 +307,8 @@
308308
309309 // Try to save the page!
310310 $resultDetails = array();
311 - $saveResultCode = $editor->internalAttemptSave( $resultDetails );
 311+ $saveResult = $editor->internalAttemptSave( $resultDetails );
 312+ $saveResultCode = $saveResult->value;
312313
313314 if ( ( $saveResultCode == EditPage::AS_HOOK_ERROR || $saveResultCode == EditPage::AS_HOOK_ERROR_EXPECTED ) && $redirectOnError ) {
314315

Follow-up revisions

RevisionCommit summaryAuthorDate
r96144Follow-up to r95674 - restored compatibility to versions of MediaWiki from be...yaron19:35, 2 September 2011
r965081.18: MFT r95562, r95570, r95597, r95608, r95647, r95648, r95674, r95790, r95...catrope21:56, 7 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95562(bug 29246) Edit API occasionally throws "unknown error 231". Per comment #1 ...catrope16:26, 26 August 2011

Status & tagging log