X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcheckImages.php;h=3e5739309633d6dcd6e051aead26cee3dc0b44c6;hb=db7e32441d2ae823d8c73506f4f13fad55ba7164;hp=976192711f22bcdc033ed3376d6b5871d71d9c80;hpb=f56a905990f579a81f15ce636ab03758c15690df;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php index 976192711f..3e57393096 100644 --- a/maintenance/checkImages.php +++ b/maintenance/checkImages.php @@ -31,21 +31,21 @@ class CheckImages extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Check images to see if they exist, are readable, etc"; + $this->addDescription( 'Check images to see if they exist, are readable, etc' ); $this->setBatchSize( 1000 ); } public function execute() { $start = ''; - $dbr = $this->getDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $numImages = 0; $numGood = 0; $repo = RepoGroup::singleton()->getLocalRepo(); do { - $res = $dbr->select( 'image', '*', array( 'img_name > ' . $dbr->addQuotes( $start ) ), - __METHOD__, array( 'LIMIT' => $this->mBatchSize ) ); + $res = $dbr->select( 'image', '*', [ 'img_name > ' . $dbr->addQuotes( $start ) ], + __METHOD__, [ 'LIMIT' => $this->mBatchSize ] ); foreach ( $res as $row ) { $numImages++; $start = $row->img_name;