X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2FHTMLFileCache.php;h=ab78ee469b547a4acafbbaa0244861f84f81d43c;hb=328f50b982b7da8adf0104fe246cea6aae595ae3;hp=3a89066f8c0a15cb0c612f431e29bf197590b17f;hpb=fd08137ebf8b34cb1a9711c34d6c4d0357aea5b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index 3a89066f8c..ab78ee469b 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -94,10 +94,6 @@ class HTMLFileCache extends FileCacheBase { $config = MediaWikiServices::getInstance()->getMainConfig(); if ( !$config->get( 'UseFileCache' ) && $mode !== self::MODE_REBUILD ) { - return false; - } elseif ( $config->get( 'DebugToolbar' ) ) { - wfDebug( "HTML file cache skipped. \$wgDebugToolbar on\n" ); - return false; } @@ -128,10 +124,8 @@ class HTMLFileCache extends FileCacheBase { return false; } - if ( $mode === self::MODE_NORMAL ) { - if ( $user->getNewtalk() ) { - return false; - } + if ( ( $mode === self::MODE_NORMAL ) && $user->getNewtalk() ) { + return false; } // Allow extensions to disable caching @@ -211,18 +205,14 @@ class HTMLFileCache extends FileCacheBase { } // gzip output to buffer as needed and set headers... - if ( $this->useGzip() ) { - // @todo Ugly wfClientAcceptsGzip() function - use context! - if ( wfClientAcceptsGzip() ) { - header( 'Content-Encoding: gzip' ); + // @todo Ugly wfClientAcceptsGzip() function - use context! + if ( $this->useGzip() && wfClientAcceptsGzip() ) { + header( 'Content-Encoding: gzip' ); - return $compressed; - } else { - return $text; - } - } else { - return $text; + return $compressed; } + + return $text; } /**