From 8d1f938ddac49dd42aa9fe20a832a9b4abfd1e81 Mon Sep 17 00:00:00 2001 From: DannyS712 Date: Mon, 23 Nov 2020 23:58:27 +0000 Subject: [PATCH] Remove checks for whether ActorMigration class exists Exists since 1.31, extension requires 1.35+ If it is ever removed, using the current handling from before it was added will break things Change-Id: Iee13649a4e3fb59195a60d178473d6e970680a45 --- includes/SpecialNuke.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/includes/SpecialNuke.php b/includes/SpecialNuke.php index dce92b47..009ff8bd 100644 --- a/includes/SpecialNuke.php +++ b/includes/SpecialNuke.php @@ -265,22 +265,13 @@ class SpecialNuke extends SpecialPage { $where = [ "(rc_new = 1) OR (rc_log_type = 'upload' AND rc_log_action = 'upload')" ]; - if ( class_exists( ActorMigration::class ) ) { - if ( $username === '' ) { - $actorQuery = ActorMigration::newMigration()->getJoin( 'rc_user' ); - $what['rc_user_text'] = $actorQuery['fields']['rc_user_text']; - } else { - $actorQuery = ActorMigration::newMigration() - ->getWhere( $dbr, 'rc_user', User::newFromName( $username, false ) ); - $where[] = $actorQuery['conds']; - } + if ( $username === '' ) { + $actorQuery = ActorMigration::newMigration()->getJoin( 'rc_user' ); + $what['rc_user_text'] = $actorQuery['fields']['rc_user_text']; } else { - $actorQuery = [ 'tables' => [], 'joins' => [] ]; - if ( $username === '' ) { - $what[] = 'rc_user_text'; - } else { - $where['rc_user_text'] = $username; - } + $actorQuery = ActorMigration::newMigration() + ->getWhere( $dbr, 'rc_user', User::newFromName( $username, false ) ); + $where[] = $actorQuery['conds']; } if ( $namespace !== null ) {