Index: trunk/extensions/Renameuser/SpecialRenameuser_body.php |
— | — | @@ -376,23 +376,23 @@ |
377 | 377 | $this->uid = $uid; |
378 | 378 | |
379 | 379 | $this->tables = array(); // Immediate updates |
380 | | - $this->tables['image'] = 'img_user_text'; |
381 | | - $this->tables['oldimage'] = 'oi_user_text'; |
382 | | - # FIXME: $this->tables['filearchive'] = 'fa_user_text'; (not indexed yet) |
| 380 | + $this->tables['image'] = array('img_user_text','img_user'); |
| 381 | + $this->tables['oldimage'] = array('oi_user_text','oi_user'); |
| 382 | + # FIXME: $this->tables['filearchive'] = array('fa_user_text','fa_user'); (not indexed yet) |
383 | 383 | $this->tablesJob = array(); // Slow updates |
384 | 384 | // If this user has a large number of edits, use the jobqueue |
385 | 385 | if( User::edits($this->uid) > RENAMEUSER_CONTRIBJOB ) { |
386 | 386 | $this->tablesJob['revision'] = array('rev_user_text','rev_user','rev_timestamp'); |
387 | 387 | $this->tablesJob['archive'] = array('ar_user_text','ar_user','ar_timestamp'); |
388 | 388 | } else { |
389 | | - $this->tables['revision'] = 'rev_user_text'; |
390 | | - $this->tables['archive'] = 'ar_user_text'; |
| 389 | + $this->tables['revision'] = array('rev_user_text','rev_user'); |
| 390 | + $this->tables['archive'] = array('ar_user_text','ar_user'); |
391 | 391 | } |
392 | 392 | // Recent changes is pretty hot, deadlocks occur if done all at once |
393 | 393 | if( wfQueriesMustScale() ) { |
394 | 394 | $this->tablesJob['recentchanges'] = array('rc_user_text','rc_user','rc_timestamp'); |
395 | 395 | } else { |
396 | | - $this->tables['recentchanges'] = 'rc_user_text'; |
| 396 | + $this->tables['recentchanges'] = array('rc_user_text','rc_user'); |
397 | 397 | } |
398 | 398 | } |
399 | 399 | |
— | — | @@ -432,10 +432,11 @@ |
433 | 433 | 'log_title' => $oldTitle->getDBKey() ), |
434 | 434 | __METHOD__ ); |
435 | 435 | // Do immediate updates! |
436 | | - foreach( $this->tables as $table => $field ) { |
| 436 | + foreach( $this->tables as $table => $fieldSet ) { |
| 437 | + list($nameCol,$userCol) = $fieldSet; |
437 | 438 | $dbw->update( $table, |
438 | | - array( $field => $this->new ), |
439 | | - array( $field => $this->old ), |
| 439 | + array( $nameCol => $this->new ), |
| 440 | + array( $nameCol => $this->old, $userCol => $this->uid ), |
440 | 441 | __METHOD__ |
441 | 442 | ); |
442 | 443 | } |