From: umherirrender Date: Sat, 9 Mar 2013 16:02:44 +0000 (+0100) Subject: Use ContextSource::getLanguage instead of $wgLang X-Git-Tag: 1.31.0-rc.0~20409 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=55183ad0b2a60a0d710cb9eeccad4f496bcc2b2f;p=lhc%2Fweb%2Fwiklou.git Use ContextSource::getLanguage instead of $wgLang Found two places, where $wgLang is used inside a ContextSource. Change-Id: I1881a20d3cd9b50eb4af0cd588451ed941f936fa --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 62219e2870..6bcc62568c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3400,8 +3400,7 @@ $templates * @return string */ public function buildCssLinks() { - global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, - $wgLang, $wgContLang; + global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgContLang; $this->getSkin()->setupSkinUserCss( $this ); @@ -3435,7 +3434,7 @@ $templates // If needed, Janus it first. This is user-supplied CSS, so it's // assumed to be right for the content language directionality. $previewedCSS = $this->getRequest()->getText( 'wpTextbox1' ); - if ( $wgLang->getDir() !== $wgContLang->getDir() ) { + if ( $this->getLanguage()->getDir() !== $wgContLang->getDir() ) { $previewedCSS = CSSJanus::transform( $previewedCSS, true, false ); } $otherTags .= Html::inlineStyle( $previewedCSS ); diff --git a/includes/api/ApiQueryAllMessages.php b/includes/api/ApiQueryAllMessages.php index b0ecca856a..0555a393c2 100644 --- a/includes/api/ApiQueryAllMessages.php +++ b/includes/api/ApiQueryAllMessages.php @@ -39,8 +39,7 @@ class ApiQueryAllMessages extends ApiQueryBase { $params = $this->extractRequestParams(); if ( is_null( $params['lang'] ) ) { - global $wgLang; - $langObj = $wgLang; + $langObj = $this->getLanguage(); } else { $langObj = Language::factory( $params['lang'] ); }