X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FfixUserRegistration.php;h=37fd44fb2e11eb6bc17c8a84499547026090b438;hp=44ac220a37e6d46a60945572b11b042067e1eec8;hb=ffba23d177d5eee876bdc59cdf1b945281b18041;hpb=ca2c2c0f4fdd633779ce1d48d09645275b0e5827 diff --git a/maintenance/fixUserRegistration.php b/maintenance/fixUserRegistration.php index 44ac220a37..37fd44fb2e 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, '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,7 +80,7 @@ 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 );