}
public function finalSetup() {
- global $wgDebugToolbar, $wgUseFileCache, $wgReadOnly;
+ global $wgDebugToolbar, $wgUseFileCache;
$this->enabled = $wgUseFileCache;
// Script will handle capturing output and saving it itself
// 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();
}