From 94cd0132b836091d9bdfde4a8a2e25a2e1e780dd Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 20 Apr 2021 11:59:00 +1000 Subject: [PATCH] Stop using legacy ActorMigration field "rc_user" Migration was complete in MW 1.34 Bug: T278917 Change-Id: Ibe5768ece9126207470c2094237112b1011c8e46 --- includes/SpecialNuke.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/includes/SpecialNuke.php b/includes/SpecialNuke.php index 945ea5f4..afaee8e8 100644 --- a/includes/SpecialNuke.php +++ b/includes/SpecialNuke.php @@ -2,7 +2,6 @@ namespace MediaWiki\Extension\Nuke; -use ActorMigration; use FileDeleteForm; use Html; use HTMLForm; @@ -282,12 +281,9 @@ class SpecialNuke extends SpecialPage { $where = [ "(rc_new = 1) OR (rc_log_type = 'upload' AND rc_log_action = 'upload')" ]; if ( $username === '' ) { - $actorQuery = ActorMigration::newMigration()->getJoin( 'rc_user' ); - $what['rc_user_text'] = $actorQuery['fields']['rc_user_text']; + $what['rc_user_text'] = 'actor_name'; } else { - $actorQuery = ActorMigration::newMigration() - ->getWhere( $dbr, 'rc_user', User::newFromName( $username, false ) ); - $where[] = $actorQuery['conds']; + $where['actor_name'] = $username; } if ( $namespace !== null ) { @@ -303,7 +299,7 @@ class SpecialNuke extends SpecialPage { $group = implode( ', ', $what ); $result = $dbr->select( - [ 'recentchanges' ] + $actorQuery['tables'], + [ 'recentchanges', 'actor' ], $what, $where, __METHOD__, @@ -312,7 +308,7 @@ class SpecialNuke extends SpecialPage { 'GROUP BY' => $group, 'LIMIT' => $limit ], - $actorQuery['joins'] + [ 'actor' => [ 'JOIN', 'actor_id=rc_actor' ] ] ); $pages = [];