X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfixUserRegistration.php;h=30364c655babf7c23cb3981f17dba2560629d0dd;hb=ea89bd1cf6c9b95bf6e8728e5466277b042122a7;hp=44ac220a37e6d46a60945572b11b042067e1eec8;hpb=5a4fdb5b4e82fd68e200a887cac9d4e106fed0af;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fixUserRegistration.php b/maintenance/fixUserRegistration.php index 44ac220a37..30364c655b 100644 --- a/maintenance/fixUserRegistration.php +++ b/maintenance/fixUserRegistration.php @@ -45,15 +45,15 @@ class FixUserRegistration extends Maintenance { $res = $dbw->select( 'user', 'user_id', - array( + [ 'user_id > ' . $dbw->addQuotes( $lastId ), 'user_registration IS NULL' - ), + ], __METHOD__, - array( - 'LIMIT' => $this->mBatchSize, + [ + 'LIMIT' => $this->getBatchSize(), 'ORDER BY' => 'user_id', - ) + ] ); foreach ( $res as $row ) { $id = $row->user_id; @@ -62,15 +62,15 @@ class FixUserRegistration extends Maintenance { $timestamp = $dbw->selectField( 'revision', 'MIN(rev_timestamp)', - array( 'rev_user' => $id ), + [ 'rev_user' => $id ], __METHOD__ ); // Update if ( $timestamp !== null ) { $dbw->update( 'user', - array( 'user_registration' => $timestamp ), - array( 'user_id' => $id ), + [ 'user_registration' => $timestamp ], + [ 'user_id' => $id ], __METHOD__ ); $user = User::newFromId( $id ); @@ -80,10 +80,10 @@ class FixUserRegistration extends Maintenance { $this->output( "Could not find registration for #$id NULL\n" ); } } - $this->output( "Waiting for slaves..." ); + $this->output( "Waiting for replica DBs..." ); wfWaitForSlaves(); $this->output( " done.\n" ); - } while ( $res->numRows() >= $this->mBatchSize ); + } while ( $res->numRows() >= $this->getBatchSize() ); } }