X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrebuildFileCache.php;h=04ac9678d9c2196c21ccdc7c601c7c708dcc6b75;hb=e19f1c0bcf1ae80f776ae649fd2c06f89c6e4fbc;hp=d073282d9690252ea11d1d3c0dbbc75cd3adba6b;hpb=cf3221a3d5d6761bd43d2ad29619636055831ce1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index d073282d96..04ac9678d9 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -41,7 +41,7 @@ class RebuildFileCache extends Maintenance { } public function finalSetup() { - global $wgDebugToolbar, $wgUseFileCache, $wgReadOnly; + global $wgDebugToolbar, $wgUseFileCache; $this->enabled = $wgUseFileCache; // Script will handle capturing output and saving it itself @@ -50,7 +50,8 @@ class RebuildFileCache extends Maintenance { // Has to be done before Setup.php initialize MWDebug $wgDebugToolbar = false; // Avoid DB writes (like enotif/counters) - $wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters) + MediaWiki\MediaWikiServices::getInstance()->getReadOnlyMode() + ->setReason( 'Building cache' ); parent::finalSetup(); } @@ -140,7 +141,7 @@ class RebuildFileCache extends Maintenance { MediaWiki\suppressWarnings(); // header notices // Cache ?action=view - $wgRequestTime = microtime( true ); # bug 22852 + $wgRequestTime = microtime( true ); # T24852 ob_start(); $article->view(); $context->getOutput()->output(); @@ -148,7 +149,7 @@ class RebuildFileCache extends Maintenance { $viewHtml = ob_get_clean(); $viewCache->saveToFileCache( $viewHtml ); // Cache ?action=history - $wgRequestTime = microtime( true ); # bug 22852 + $wgRequestTime = microtime( true ); # T24852 ob_start(); Action::factory( 'history', $article, $context )->show(); $context->getOutput()->output();