Index: trunk/extensions/Renameuser/Renameuser_body.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | $wgOut->permissionRequired( 'renameuser' ); |
34 | 34 | return; |
35 | 35 | } |
36 | | - |
| 36 | + |
37 | 37 | if ( wfReadOnly() ) { |
38 | 38 | $wgOut->readOnlyPage(); |
39 | 39 | return; |
— | — | @@ -101,7 +101,7 @@ |
102 | 102 | "</td> |
103 | 103 | </tr>" |
104 | 104 | ); |
105 | | - |
| 105 | + |
106 | 106 | if ( $wgUser->isAllowed( 'suppressredirect' ) ) { |
107 | 107 | $wgOut->addHTML( " |
108 | 108 | <tr> |
— | — | @@ -280,7 +280,7 @@ |
281 | 281 | |
282 | 282 | $suppressRedirect = false; |
283 | 283 | |
284 | | - if ( $wgRequest->getCheck( 'suppressredirect' ) && $wgUser->isAllowed( 'suppressredirect' ) ) { |
| 284 | + if ( $wgRequest->getCheck( 'suppressredirect' ) && $wgUser->isAllowed( 'suppressredirect' ) ) { |
285 | 285 | $suppressRedirect = true; |
286 | 286 | } |
287 | 287 | |
— | — | @@ -420,6 +420,7 @@ |
421 | 421 | __METHOD__ |
422 | 422 | ); |
423 | 423 | if ( !$dbw->affectedRows() ) { |
| 424 | + $dbw->rollback(); |
424 | 425 | return false; |
425 | 426 | } |
426 | 427 | // Reset token to break login with central auth systems. |
— | — | @@ -456,14 +457,14 @@ |
457 | 458 | __METHOD__ |
458 | 459 | ); |
459 | 460 | } |
460 | | - |
| 461 | + |
461 | 462 | // Increase time limit (like CheckUser); this can take a while... |
462 | 463 | if ( $this->tablesJob ) { |
463 | 464 | wfSuppressWarnings(); |
464 | 465 | set_time_limit( 120 ); |
465 | 466 | wfRestoreWarnings(); |
466 | 467 | } |
467 | | - |
| 468 | + |
468 | 469 | $jobs = array(); // jobs for all tables |
469 | 470 | // Construct jobqueue updates... |
470 | 471 | // FIXME: if a bureaucrat renames a user in error, he/she |