X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcheckUsernames.php;h=6c66da4f39a0ec0250cceda7ec863892aff245b1;hb=d9a965c69d0712567efd68c94a1f38f9cd50056c;hp=a64bc498fa1b01f7d184e548f260ebf30c892945;hpb=d4cc4117d79648ab5f6d1d3f7dc84b043b073008;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkUsernames.php b/maintenance/checkUsernames.php index a64bc498fa..6c66da4f39 100644 --- a/maintenance/checkUsernames.php +++ b/maintenance/checkUsernames.php @@ -35,23 +35,23 @@ class CheckUsernames extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Verify that database usernames are actually valid"; + $this->addDescription( 'Verify that database usernames are actually valid' ); $this->setBatchSize( 1000 ); } function execute() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); $maxUserId = 0; do { $res = $dbr->select( 'user', - array( 'user_id', 'user_name' ), - array( 'user_id > ' . $maxUserId ), + [ 'user_id', 'user_name' ], + [ 'user_id > ' . $maxUserId ], __METHOD__, - array( + [ 'ORDER BY' => 'user_id', 'LIMIT' => $this->mBatchSize, - ) + ] ); foreach ( $res as $row ) {