Merge "Fix various mistakes in PHPDoc comments"
[lhc/web/wiklou.git] / includes / cache / HTMLFileCache.php
index 58ca2dc..298f6e2 100644 (file)
@@ -48,6 +48,7 @@ class HTMLFileCache extends FileCacheBase {
         * @throws MWException
         */
        public function __construct( $title, $action ) {
+               parent::__construct();
                $allowedTypes = self::cacheablePageActions();
                if ( !in_array( $action, $allowedTypes ) ) {
                        throw new MWException( 'Invalid file cache type given.' );
@@ -95,12 +96,12 @@ class HTMLFileCache extends FileCacheBase {
         * @return bool
         */
        public static function useFileCache( IContextSource $context ) {
-               global $wgUseFileCache, $wgShowIPinHeader, $wgDebugToolbar, $wgContLang;
+               global $wgUseFileCache, $wgDebugToolbar, $wgContLang;
                if ( !$wgUseFileCache ) {
                        return false;
                }
-               if ( $wgShowIPinHeader || $wgDebugToolbar ) {
-                       wfDebug( "HTML file cache skipped. Either \$wgShowIPinHeader and/or \$wgDebugToolbar on\n" );
+               if ( $wgDebugToolbar ) {
+                       wfDebug( "HTML file cache skipped. \$wgDebugToolbar on\n" );
 
                        return false;
                }
@@ -131,7 +132,7 @@ class HTMLFileCache extends FileCacheBase {
                        return false;
                }
                // Allow extensions to disable caching
-               return wfRunHooks( 'HTMLFileCache::useFileCache', array( $context ) );
+               return Hooks::run( 'HTMLFileCache::useFileCache', array( $context ) );
        }
 
        /**