* @throws MWException
*/
public function output( $return = false ) {
+ global $wgContLang;
+
if ( $this->mDoNothing ) {
return $return ? '' : null;
}
ob_start();
$response->header( 'Content-type: ' . $config->get( 'MimeType' ) . '; charset=UTF-8' );
- $response->header( 'Content-language: ' . $config->get( 'ContLang' )->getHtmlCode() );
+ $response->header( 'Content-language: ' . $wgContLang->getHtmlCode() );
// Avoid Internet Explorer "compatibility view" in IE 8-10, so that
// jQuery etc. can work correctly.
* @return void
*/
public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
+ global $wgContLang;
$config = MediaWikiServices::getInstance()->getMainConfig();
wfDebug( __METHOD__ . "()\n" );
$context->getTitle()->resetArticleID( 0 );
}
- $contLang = $config->get( 'ContLang' );
$context->getOutput()->sendCacheControl();
header( "Content-Type: {$config->get( 'MimeType' )}; charset=UTF-8" );
- header( "Content-Language: {$contLang->getHtmlCode()}" );
+ header( "Content-Language: {$wgContLang->getHtmlCode()}" );
if ( $this->useGzip() ) {
if ( wfClientAcceptsGzip() ) {
header( 'Content-Encoding: gzip' );