mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Nuke
synced 2024-11-15 03:35:39 +00:00
Stop using legacy ActorMigration field "rc_user"
Migration was complete in MW 1.34 Bug: T278917 Change-Id: Ibe5768ece9126207470c2094237112b1011c8e46
This commit is contained in:
parent
fb40d22195
commit
94cd0132b8
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in a new issue