X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fcache%2FHTMLFileCache.php;h=f8cd754a0694b9018a563234c5804607ee5f4af3;hb=fc17ad555c430ece410264ecbd2d425765e720d1;hp=b0a3a1c262d1ecafc05115520d5950d4ceb2d49a;hpb=6ead43f2123fec255acccce6bf68f31b51196a55;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index b0a3a1c262..f8cd754a06 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -87,10 +87,11 @@ class HTMLFileCache extends FileCacheBase { /** * Check if pages can be cached for this request/user * @param IContextSource $context - * @param integer $mode One of the HTMLFileCache::MODE_* constants (since 1.28) + * @param int $mode One of the HTMLFileCache::MODE_* constants (since 1.28) * @return bool */ public static function useFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) { + global $wgContLang; $config = MediaWikiServices::getInstance()->getMainConfig(); if ( !$config->get( 'UseFileCache' ) && $mode !== self::MODE_REBUILD ) { @@ -123,7 +124,7 @@ class HTMLFileCache extends FileCacheBase { $ulang = $context->getLanguage(); // Check that there are no other sources of variation - if ( $user->getId() || $ulang->getCode() !== $config->get( 'LanguageCode' ) ) { + if ( $user->getId() || !$ulang->equals( $wgContLang ) ) { return false; } @@ -140,7 +141,7 @@ class HTMLFileCache extends FileCacheBase { /** * Read from cache to context output * @param IContextSource $context - * @param integer $mode One of the HTMLFileCache::MODE_* constants + * @param int $mode One of the HTMLFileCache::MODE_* constants * @return void */ public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {