X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FfixUserRegistration.php;h=f4674cb29412a8e2968018e0cc2b23ef43fcaf1d;hb=83691ed06e8ec7ef1f6f7290b8c5c175ab9f4928;hp=44ac220a37e6d46a60945572b11b042067e1eec8;hpb=ca2c2c0f4fdd633779ce1d48d09645275b0e5827;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/fixUserRegistration.php b/maintenance/fixUserRegistration.php index 44ac220a37..f4674cb294 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 );