X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrebuildFileCache.php;h=19d8d061546436d29db65ccaf46f92c6ad4a81dd;hb=716814a5d501efcc99b09fbb7e26caaf9a395d26;hp=04ac9678d9c2196c21ccdc7c601c7c708dcc6b75;hpb=331f5d7b276c17a23fca9270ac508da746e8c92e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 04ac9678d9..19d8d06154 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -78,7 +78,8 @@ class RebuildFileCache extends Maintenance { $this->output( "Building content page file cache from page {$start}!\n" ); $dbr = $this->getDB( DB_REPLICA ); - $overwrite = $this->getOption( 'overwrite', false ); + $batchSize = $this->getBatchSize(); + $overwrite = $this->hasOption( 'overwrite' ); $start = ( $start > 0 ) ? $start : $dbr->selectField( 'page', 'MIN(page_id)', false, __METHOD__ ); @@ -92,9 +93,9 @@ class RebuildFileCache extends Maintenance { $_SERVER['HTTP_ACCEPT_ENCODING'] = 'bgzip'; // hack, no real client # Do remaining chunk - $end += $this->mBatchSize - 1; + $end += $batchSize - 1; $blockStart = $start; - $blockEnd = $start + $this->mBatchSize - 1; + $blockEnd = $start + $batchSize - 1; $dbw = $this->getDB( DB_MASTER ); // Go through each page and save the output @@ -171,8 +172,8 @@ class RebuildFileCache extends Maintenance { } $this->commitTransaction( $dbw, __METHOD__ ); // commit any changes (just for sanity) - $blockStart += $this->mBatchSize; - $blockEnd += $this->mBatchSize; + $blockStart += $batchSize; + $blockEnd += $batchSize; } $this->output( "Done!\n" ); }