disable wgDebugToolbar when rebuilding file cache
credits to iAlex :)
This commit is contained in:
parent
31827c47b1
commit
57e874c374
2 changed files with 10 additions and 1 deletions
7
includes/cache/HTMLFileCache.php
vendored
7
includes/cache/HTMLFileCache.php
vendored
|
|
@ -61,10 +61,15 @@ class HTMLFileCache extends FileCacheBase {
|
|||
* @return bool
|
||||
*/
|
||||
public static function useFileCache( IContextSource $context ) {
|
||||
global $wgUseFileCache, $wgShowIPinHeader, $wgContLang;
|
||||
global $wgUseFileCache, $wgShowIPinHeader, $wgDebugToolbar, $wgContLang;
|
||||
if ( !$wgUseFileCache ) {
|
||||
return false;
|
||||
}
|
||||
if( $wgShowIPinHeader || $wgDebugToolbar ) {
|
||||
wfDebug("HTML file cache skipped. Either \$wgShowIPinHeader and/or \$wgDebugToolbar on\n" );
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get all query values
|
||||
$queryVals = $context->getRequest()->getValues();
|
||||
foreach ( $queryVals as $query => $val ) {
|
||||
|
|
|
|||
|
|
@ -34,10 +34,14 @@ class RebuildFileCache extends Maintenance {
|
|||
|
||||
public function execute() {
|
||||
global $wgUseFileCache, $wgReadOnly, $wgContentNamespaces, $wgRequestTime;
|
||||
global $wgDebugToolbar;
|
||||
global $wgTitle, $wgOut;
|
||||
if ( !$wgUseFileCache ) {
|
||||
$this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true );
|
||||
}
|
||||
// Debug toolbar makes content uncacheable
|
||||
$wgDebugToolbar = false;
|
||||
|
||||
$wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters)
|
||||
|
||||
$start = $this->getOption( 'start', "0" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue