Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php |
— | — | @@ -183,7 +183,7 @@ |
184 | 184 | return; |
185 | 185 | } |
186 | 186 | } |
187 | | - |
| 187 | + |
188 | 188 | // Give other affected extensions a chance to validate or abort |
189 | 189 | if( !wfRunHooks( 'RenameUserAbort', array( $uid, $oldusername->getText(), $newusername->getText() ) ) ) { |
190 | 190 | return; |
— | — | @@ -195,7 +195,7 @@ |
196 | 196 | $log = new LogPage( 'renameuser' ); |
197 | 197 | $log->addEntry( 'renameuser', $oldusername, wfMsgForContent( 'renameuser-log', $wgContLang->formatNum( $contribs ), $reason ), $newusername->getText() ); |
198 | 198 | |
199 | | - $wgOut->addWikiText( "<div class=\"successbox\">" . wfMsg( 'renameusersuccess', $oldusername->getText(), $newusername->getText() ) . "</div>" ); |
| 199 | + $wgOut->addWikiText( "<div class=\"successbox\">" . wfMsg( 'renameusersuccess', $oldusername->getText(), $newusername->getText() ) . "</div><br style=\"clear:both\" />" ); |
200 | 200 | |
201 | 201 | if ( $wgRequest->getCheck( 'movepages' ) && $wgUser->isAllowed( 'move' ) && version_compare( $wgVersion, '1.9alpha', '>=' ) ) { |
202 | 202 | $dbr =& wfGetDB( DB_SLAVE ); |
— | — | @@ -258,11 +258,11 @@ |
259 | 259 | /** |
260 | 260 | * The old username |
261 | 261 | * |
262 | | - * @var string |
| 262 | + * @var string |
263 | 263 | * @access private |
264 | 264 | */ |
265 | 265 | var $old; |
266 | | - |
| 266 | + |
267 | 267 | /** |
268 | 268 | * The new username |
269 | 269 | * |
— | — | @@ -270,7 +270,7 @@ |
271 | 271 | * @access private |
272 | 272 | */ |
273 | 273 | var $new; |
274 | | - |
| 274 | + |
275 | 275 | /** |
276 | 276 | * The user ID |
277 | 277 | * |
— | — | @@ -313,7 +313,7 @@ |
314 | 314 | $this->tables['revision'] = 'rev_user_text'; |
315 | 315 | $this->tables['recentchanges'] = 'rc_user_text'; |
316 | 316 | } |
317 | | - |
| 317 | + |
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
— | — | @@ -321,9 +321,9 @@ |
322 | 322 | */ |
323 | 323 | function rename() { |
324 | 324 | global $wgMemc, $wgDBname, $wgAuth; |
325 | | - |
| 325 | + |
326 | 326 | wfProfileIn( __METHOD__ ); |
327 | | - |
| 327 | + |
328 | 328 | $dbw =& wfGetDB( DB_MASTER ); |
329 | 329 | // Rename and touch the user before re-attributing edits, |
330 | 330 | // this avoids users still being logged in and making new edits while |
— | — | @@ -342,15 +342,15 @@ |
343 | 343 | #,array( $dbw->lowPriorityOption() ) |
344 | 344 | ); |
345 | 345 | } |
346 | | - |
| 346 | + |
347 | 347 | foreach( $this->tablesJob as $table => $params ) { |
348 | 348 | $res = $dbw->select( $table, |
349 | 349 | array( $params[0], $params[1] ), |
350 | 350 | array( $params[0] => $this->old ) |
351 | 351 | ); |
352 | | - |
| 352 | + |
353 | 353 | global $wgUpdateRowsPerJob; |
354 | | - |
| 354 | + |
355 | 355 | $batchSize = 500; // Lets not flood the job table! |
356 | 356 | $jobSize = $wgUpdateRowsPerJob; // How many rows per job? |
357 | 357 | |
— | — | @@ -402,5 +402,3 @@ |
403 | 403 | wfProfileOut( __METHOD__ ); |
404 | 404 | } |
405 | 405 | } |
406 | | - |
407 | | - |