Index: trunk/extensions/SpecialForm/SpecialForm.body.php |
— | — | @@ -228,8 +228,8 @@ |
229 | 229 | |
230 | 230 | $article = new Article($nt[$i]); |
231 | 231 | |
232 | | - |
233 | | - if (!$article->doEdit($text, wfMsg('formsavesummary', $form->name), EDIT_NEW)) { |
| 232 | + $status = $article->doEdit($text, wfMsg('formsavesummary', $form->name), EDIT_NEW); |
| 233 | + if ( $status === false || ( is_object( $status ) && !$status->isOK() ) ) { |
234 | 234 | $wgOut->showErrorPage('formsaveerror', 'formsaveerrortext', array($title)); |
235 | 235 | return; # Don't continue |
236 | 236 | } |
Index: trunk/extensions/MetavidWiki/includes/specials/MV_SpecialCRUDStream.php |
— | — | @@ -200,8 +200,8 @@ |
201 | 201 | // insert page |
202 | 202 | $streamTitle = Title::newFromText( $this->stream_name, MV_NS_STREAM ); |
203 | 203 | $wgArticle = new Article( $streamTitle ); |
204 | | - $success = $wgArticle->doEdit( $this->stream_desc, wfMsg( 'mv_summary_add_stream' ) ); |
205 | | - if ( $success ) { |
| 204 | + $status = $wgArticle->doEdit( $this->stream_desc, wfMsg( 'mv_summary_add_stream' ) ); |
| 205 | + if ( $status === true || ( is_object( $status ) && $status->isOK() ) ) { |
206 | 206 | // stream inserted succesfully report to output |
207 | 207 | $streamLink = $sk->makeLinkObj( $streamTitle, $this->stream_name ); |
208 | 208 | $out = 'stream ' . htmlspecialchars( $streamLink ) . ' added'; |
Index: trunk/extensions/Translate/scripts/poimport.php |
— | — | @@ -234,9 +234,9 @@ |
235 | 235 | |
236 | 236 | $wgArticle = new Article( $wgTitle ); |
237 | 237 | |
238 | | - $success = $wgArticle->doEdit( $text, 'Updating translation from gettext import' ); |
| 238 | + $status = $wgArticle->doEdit( $text, 'Updating translation from gettext import' ); |
239 | 239 | |
240 | | - if ( $success ) { |
| 240 | + if ( $status === true || ( is_object( $status ) && $status->isOK() ) ) { |
241 | 241 | STDOUT( "OK!", $title ); |
242 | 242 | } else { |
243 | 243 | STDOUT( "Failed!", $title ); |
Index: trunk/extensions/Translate/scripts/sync-group.php |
— | — | @@ -285,7 +285,8 @@ |
286 | 286 | |
287 | 287 | $article = new Article( $title ); |
288 | 288 | STDOUT( "Importing {$title->getPrefixedText()}: ", $title ); |
289 | | - $success = $article->doEdit( $translation, $comment, $flags ); |
| 289 | + $status = $article->doEdit( $translation, $comment, $flags ); |
| 290 | + $success = $status === true || ( is_object( $status ) && $status->isOK() ); |
290 | 291 | STDOUT( $success ? 'OK' : 'FAILED', $title ); |
291 | 292 | |
292 | 293 | $wgUser = $old; |
— | — | @@ -293,4 +294,4 @@ |
294 | 295 | |
295 | 296 | } |
296 | 297 | |
297 | | -STDOUT( wfTimestamp( TS_RFC2822 ) ); |
\ No newline at end of file |
| 298 | +STDOUT( wfTimestamp( TS_RFC2822 ) ); |
Index: trunk/extensions/Translate/scripts/fuzzy.php |
— | — | @@ -156,9 +156,9 @@ |
157 | 157 | |
158 | 158 | $comment = $this->comment ? $this->comment : 'Marking as fuzzy'; |
159 | 159 | |
160 | | - $success = $wgArticle->doEdit( TRANSLATE_FUZZY . $text, $comment, EDIT_FORCE_BOT ); |
| 160 | + $status = $wgArticle->doEdit( TRANSLATE_FUZZY . $text, $comment, EDIT_FORCE_BOT ); |
161 | 161 | |
162 | | - if ( $success ) { |
| 162 | + if ( $status === true || ( is_object( $status ) && $status->isOK() ) ) { |
163 | 163 | STDOUT( "OK!", false ); |
164 | 164 | } else { |
165 | 165 | STDOUT( "Failed!", false ); |
— | — | @@ -166,4 +166,4 @@ |
167 | 167 | |
168 | 168 | } |
169 | 169 | |
170 | | -} |
\ No newline at end of file |
| 170 | +} |
Index: trunk/extensions/Translate/SpecialMagic.php |
— | — | @@ -469,9 +469,9 @@ |
470 | 470 | $data = "# DO NOT EDIT THIS PAGE DIRECTLY! Use [[Special:Magic]].\n<pre>\n" . $this->formatForSave( $request ) . "\n</pre>"; |
471 | 471 | |
472 | 472 | $comment = $request->getText( 'comment', wfMsgForContent( self::MSG . 'updatedusing' ) ); |
473 | | - $success = $article->doEdit( $data, $comment, 0 ); |
| 473 | + $status = $article->doEdit( $data, $comment, 0 ); |
474 | 474 | |
475 | | - if ( !$success ) { |
| 475 | + if ( $status === false || ( is_object( $status ) && !$status->isOK() ) ) { |
476 | 476 | throw new MWException( wfMsgHtml( self::MSG . 'savefailed' ) ); |
477 | 477 | } |
478 | 478 | |