r26305 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26304‎ | r26305 | r26306 >
Date:09:15, 2 October 2007
Author:raymond
Status:old
Tags:
Comment:
* Clear floating successbox so that the following list of moved pages looks nicer
* Kill whitespaces
Modified paths:
  • /trunk/extensions/Renameuser/SpecialRenameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php
@@ -183,7 +183,7 @@
184184 return;
185185 }
186186 }
187 -
 187+
188188 // Give other affected extensions a chance to validate or abort
189189 if( !wfRunHooks( 'RenameUserAbort', array( $uid, $oldusername->getText(), $newusername->getText() ) ) ) {
190190 return;
@@ -195,7 +195,7 @@
196196 $log = new LogPage( 'renameuser' );
197197 $log->addEntry( 'renameuser', $oldusername, wfMsgForContent( 'renameuser-log', $wgContLang->formatNum( $contribs ), $reason ), $newusername->getText() );
198198
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\" />" );
200200
201201 if ( $wgRequest->getCheck( 'movepages' ) && $wgUser->isAllowed( 'move' ) && version_compare( $wgVersion, '1.9alpha', '>=' ) ) {
202202 $dbr =& wfGetDB( DB_SLAVE );
@@ -258,11 +258,11 @@
259259 /**
260260 * The old username
261261 *
262 - * @var string
 262+ * @var string
263263 * @access private
264264 */
265265 var $old;
266 -
 266+
267267 /**
268268 * The new username
269269 *
@@ -270,7 +270,7 @@
271271 * @access private
272272 */
273273 var $new;
274 -
 274+
275275 /**
276276 * The user ID
277277 *
@@ -313,7 +313,7 @@
314314 $this->tables['revision'] = 'rev_user_text';
315315 $this->tables['recentchanges'] = 'rc_user_text';
316316 }
317 -
 317+
318318 }
319319
320320 /**
@@ -321,9 +321,9 @@
322322 */
323323 function rename() {
324324 global $wgMemc, $wgDBname, $wgAuth;
325 -
 325+
326326 wfProfileIn( __METHOD__ );
327 -
 327+
328328 $dbw =& wfGetDB( DB_MASTER );
329329 // Rename and touch the user before re-attributing edits,
330330 // this avoids users still being logged in and making new edits while
@@ -342,15 +342,15 @@
343343 #,array( $dbw->lowPriorityOption() )
344344 );
345345 }
346 -
 346+
347347 foreach( $this->tablesJob as $table => $params ) {
348348 $res = $dbw->select( $table,
349349 array( $params[0], $params[1] ),
350350 array( $params[0] => $this->old )
351351 );
352 -
 352+
353353 global $wgUpdateRowsPerJob;
354 -
 354+
355355 $batchSize = 500; // Lets not flood the job table!
356356 $jobSize = $wgUpdateRowsPerJob; // How many rows per job?
357357
@@ -402,5 +402,3 @@
403403 wfProfileOut( __METHOD__ );
404404 }
405405 }
406 -
407 -

Status & tagging log