$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( MediaWikiServices::getInstance()->getContentLanguage() ) ) {
return false;
}
* @return void
*/
public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
- global $wgContLang;
$config = MediaWikiServices::getInstance()->getMainConfig();
wfDebug( __METHOD__ . "()\n" );
$context->getOutput()->sendCacheControl();
header( "Content-Type: {$config->get( 'MimeType' )}; charset=UTF-8" );
- header( "Content-Language: {$wgContLang->getHtmlCode()}" );
+ header( 'Content-Language: ' .
+ MediaWikiServices::getInstance()->getContentLanguage()->getHtmlCode() );
if ( $this->useGzip() ) {
if ( wfClientAcceptsGzip() ) {
header( 'Content-Encoding: gzip' );