X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FresetUserTokens.php;h=284db2c22e70a53003c192b7741ed9a571c70f26;hb=899f475d0dad8ea0a24f706fc8ac07e3097d6191;hp=131a569d6c481a2d9612907b855234f2ad3165d0;hpb=bef9303bf6fd0cd5a33f58f28bd3bb4f27226f7e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/resetUserTokens.php b/maintenance/resetUserTokens.php index 131a569d6c..284db2c22e 100644 --- a/maintenance/resetUserTokens.php +++ b/maintenance/resetUserTokens.php @@ -64,11 +64,11 @@ class ResetUserTokens extends Maintenance { $this->output( "\n" ); $this->output( "Abort with control-c in the next five seconds " . "(skip this countdown with --nowarn) ... " ); - wfCountDown( 5 ); + $this->countDown( 5 ); } - // We list user by user_id from one of the slave database - $dbr = $this->getDB( DB_SLAVE ); + // We list user by user_id from one of the replica DBs + $dbr = $this->getDB( DB_REPLICA ); $where = []; if ( $this->nullsOnly ) { @@ -79,7 +79,7 @@ class ResetUserTokens extends Maintenance { $maxid = $dbr->selectField( 'user', 'MAX(user_id)', [], __METHOD__ ); $min = 0; - $max = $this->mBatchSize; + $max = $this->getBatchSize(); do { $result = $dbr->select( 'user', @@ -98,7 +98,7 @@ class ResetUserTokens extends Maintenance { } $min = $max; - $max = $min + $this->mBatchSize; + $max = $min + $this->getBatchSize(); wfWaitForSlaves(); } while ( $min <= $maxid ); @@ -115,5 +115,5 @@ class ResetUserTokens extends Maintenance { } } -$maintClass = "ResetUserTokens"; +$maintClass = ResetUserTokens::class; require_once RUN_MAINTENANCE_IF_MAIN;