Merge "RCFilters: rephrase newcomers description"
[lhc/web/wiklou.git] / maintenance / checkImages.php
index 9a8203f..2df0a09 100644 (file)
@@ -37,15 +37,16 @@ class CheckImages extends Maintenance {
 
        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', LocalFile::selectFields(),
+                               [ 'img_name > ' . $dbr->addQuotes( $start ) ],
+                               __METHOD__, [ 'LIMIT' => $this->mBatchSize ] );
                        foreach ( $res as $row ) {
                                $numImages++;
                                $start = $row->img_name;