X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshImageMetadata.php;h=f6c0673b10bef458f94e3d609b1752233dc34c25;hb=e7f6fc6d6f2306ec9b07e736088f3fd420c70681;hp=b7f03d9bb66128ce1211d6dd8ea8ba6993f2dfa9;hpb=7ff01f46c40975098590290918f98893c7f65118;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index b7f03d9bb6..f6c0673b10 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -106,7 +106,8 @@ class RefreshImageMetadata extends Maintenance { $error = 0; $dbw = $this->getDB( DB_MASTER ); - if ( $this->mBatchSize <= 0 ) { + $batchSize = $this->getBatchSize(); + if ( $batchSize <= 0 ) { $this->error( "Batch size is too low...", 12 ); } @@ -120,7 +121,7 @@ class RefreshImageMetadata extends Maintenance { } $options = [ - 'LIMIT' => $this->mBatchSize, + 'LIMIT' => $batchSize, 'ORDER BY' => 'img_name ASC', ]; @@ -194,7 +195,7 @@ class RefreshImageMetadata extends Maintenance { } $conds2 = [ 'img_name > ' . $dbw->addQuotes( $row->img_name ) ]; wfWaitForSlaves(); - } while ( $res->numRows() === $this->mBatchSize ); + } while ( $res->numRows() === $batchSize ); $total = $upgraded + $leftAlone; if ( $force ) {