r92875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92874‎ | r92875 | r92876 >
Date:18:44, 22 July 2011
Author:aaron
Status:ok
Tags:
Comment:
Added missing rollback() call
Modified paths:
  • /trunk/extensions/Renameuser/Renameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/Renameuser_body.php
@@ -32,7 +32,7 @@
3333 $wgOut->permissionRequired( 'renameuser' );
3434 return;
3535 }
36 -
 36+
3737 if ( wfReadOnly() ) {
3838 $wgOut->readOnlyPage();
3939 return;
@@ -101,7 +101,7 @@
102102 "</td>
103103 </tr>"
104104 );
105 -
 105+
106106 if ( $wgUser->isAllowed( 'suppressredirect' ) ) {
107107 $wgOut->addHTML( "
108108 <tr>
@@ -280,7 +280,7 @@
281281
282282 $suppressRedirect = false;
283283
284 - if ( $wgRequest->getCheck( 'suppressredirect' ) && $wgUser->isAllowed( 'suppressredirect' ) ) {
 284+ if ( $wgRequest->getCheck( 'suppressredirect' ) && $wgUser->isAllowed( 'suppressredirect' ) ) {
285285 $suppressRedirect = true;
286286 }
287287
@@ -420,6 +420,7 @@
421421 __METHOD__
422422 );
423423 if ( !$dbw->affectedRows() ) {
 424+ $dbw->rollback();
424425 return false;
425426 }
426427 // Reset token to break login with central auth systems.
@@ -456,14 +457,14 @@
457458 __METHOD__
458459 );
459460 }
460 -
 461+
461462 // Increase time limit (like CheckUser); this can take a while...
462463 if ( $this->tablesJob ) {
463464 wfSuppressWarnings();
464465 set_time_limit( 120 );
465466 wfRestoreWarnings();
466467 }
467 -
 468+
468469 $jobs = array(); // jobs for all tables
469470 // Construct jobqueue updates...
470471 // FIXME: if a bureaucrat renames a user in error, he/she

Status & tagging log