Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / cache / HTMLFileCache.php
index a85639f..b0a3a1c 100644 (file)
@@ -35,19 +35,6 @@ class HTMLFileCache extends FileCacheBase {
        const MODE_OUTAGE = 1; // fallback cache for DB outages
        const MODE_REBUILD = 2; // background cache rebuild mode
 
-       /**
-        * Construct an HTMLFileCache object from a Title and an action
-        *
-        * @deprecated since 1.24, instantiate this class directly
-        * @param Title|string $title Title object or prefixed DB key string
-        * @param string $action
-        * @throws MWException
-        * @return HTMLFileCache
-        */
-       public static function newFromTitle( $title, $action ) {
-               return new self( $title, $action );
-       }
-
        /**
         * @param Title|string $title Title object or prefixed DB key string
         * @param string $action
@@ -157,6 +144,7 @@ class HTMLFileCache extends FileCacheBase {
         * @return void
         */
        public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
+               global $wgContLang;
                $config = MediaWikiServices::getInstance()->getMainConfig();
 
                wfDebug( __METHOD__ . "()\n" );
@@ -169,7 +157,7 @@ class HTMLFileCache extends FileCacheBase {
 
                $context->getOutput()->sendCacheControl();
                header( "Content-Type: {$config->get( 'MimeType' )}; charset=UTF-8" );
-               header( "Content-Language: {$config->get( 'LanguageCode' )}" );
+               header( "Content-Language: {$wgContLang->getHtmlCode()}" );
                if ( $this->useGzip() ) {
                        if ( wfClientAcceptsGzip() ) {
                                header( 'Content-Encoding: gzip' );