X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles_versions%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=blobdiff_plain;f=maintenance%2FcheckUsernames.php;h=e6d95477c374089a8bf56175beeabbd35ddcedc2;hb=3742b0b0819f488cd0872d2c455a06fe9678230b;hp=6f4d1704576c0376479fe32f0438311c0044c6c0;hpb=3301e78e5a2e5662952c0564f830a492743f9844;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkUsernames.php b/maintenance/checkUsernames.php index 6f4d170457..e6d95477c3 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 = $this->getDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $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 ) {