X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FremoveUnusedAccounts.php;h=c750784e2a08a824df9499edb150528a0af4ad68;hb=dfafef8e706af54706d2de621b845085604f154d;hp=e3c99ed5c90bf8077fc886f113b026fed6246fde;hpb=b5906606e1aa1a795231fb813b766818b1dd6c25;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/removeUnusedAccounts.php b/maintenance/removeUnusedAccounts.php index e3c99ed5c9..c750784e2a 100644 --- a/maintenance/removeUnusedAccounts.php +++ b/maintenance/removeUnusedAccounts.php @@ -39,13 +39,12 @@ class RemoveUnusedAccounts extends Maintenance { } public function execute() { - $this->output( "Remove unused accounts\n\n" ); # Do an initial scan for inactive accounts and report the result $this->output( "Checking for unused user accounts...\n" ); $del = []; - $dbr = $this->getDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $res = $dbr->select( 'user', [ 'user_id', 'user_name', 'user_touched' ], '', __METHOD__ ); if ( $this->hasOption( 'ignore-groups' ) ) { $excludedGroups = explode( ',', $this->getOption( 'ignore-groups' ) ); @@ -107,7 +106,7 @@ class RemoveUnusedAccounts extends Maintenance { * @return bool */ private function isInactiveAccount( $id, $master = false ) { - $dbo = $this->getDB( $master ? DB_MASTER : DB_SLAVE ); + $dbo = $this->getDB( $master ? DB_MASTER : DB_REPLICA ); $checks = [ 'revision' => 'rev', 'archive' => 'ar',