r23915 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23914‎ | r23915 | r23916 >
Date:18:49, 9 July 2007
Author:aaron
Status:old
Tags:
Comment:
*Update archive table too
Modified paths:
  • /trunk/extensions/Renameuser/RenameUserJob.php (modified) (history)
  • /trunk/extensions/Renameuser/SpecialRenameuser.php (modified) (history)
  • /trunk/extensions/Renameuser/SpecialRenameuser_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Renameuser/RenameUserJob.php
@@ -1,8 +1,7 @@
22 <?php
33
44 /**
5 - * Custom job to perform updates on less important tables
6 - * in busier environments
 5+ * Custom job to perform updates on tables in busier environments
76 */
87 class RenameUserJob extends Job {
98
Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php
@@ -288,7 +288,8 @@
289289 // 1.5 schema
290290 $this->tables = array(
291291 'image' => 'img_user_text',
292 - 'oldimage' => 'oi_user_text'
 292+ 'oldimage' => 'oi_user_text',
 293+ 'archive' => 'ar_user_text'
293294 );
294295 $this->tablesJob = array();
295296 // See if this is for large tables on large, busy, wikis
@@ -300,11 +301,6 @@
301302 $this->tables['recentchanges'] = 'rc_user_text';
302303 }
303304
304 - global $wgRenameUserQuick;
305 - // As of 1.10, usernames are not indexed here; too slow for large wikis
306 - if( !$wgRenameUserQuick )
307 - $this->tables['archive'] = 'ar_user_text';
308 -
309305 }
310306
311307 /**
@@ -317,7 +313,7 @@
318314
319315 $dbw =& wfGetDB( DB_MASTER );
320316 // Rename and touch the user before re-attributing edits,
321 - // this avoids users still being login in and making new edits while
 317+ // this avoids users still being logged in and making new edits while
322318 // being renamed, which leaves edits at the old name.
323319 $dbw->update( 'user',
324320 array( 'user_name' => $this->new, 'user_touched' => $dbw->timestamp() ),
Index: trunk/extensions/Renameuser/SpecialRenameuser.php
@@ -44,13 +44,6 @@
4545 $wgSpecialPages['Renameuser'] = 'SpecialRenameuser';
4646 $wgJobClasses['renameUser'] = 'RenameUserJob';
4747
48 -/**
49 - * If this is set to true, then the archive table (deleted revisions) will
50 - * not be updated. Defaults to the value of $wgMiserMode, since if that's on,
51 - * then it's probably desirable to have this switched on too.
52 - */
53 -$wgRenameUserQuick = $wgMiserMode;
54 -
5548 function wfSpecialRenameuser() {
5649 # Add messages
5750 global $wgMessageCache, $wgRenameuserMessages;

Status & tagging log