X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcheckImages.php;h=f05d15c0af2d7bb3f1f85aa137ed19112aa9bf04;hb=96519cfa9746652c143d927b0089324e1f86f6c0;hp=0364db20e52a3ced1528e0edd58981875acd19fc;hpb=979681f48871c16efd485e78d78f98c9a094212b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php index 0364db20e5..f05d15c0af 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 = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); $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;