Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/52982
Change subject: Use ContextSource::getLanguage instead of $wgLang ...................................................................... Use ContextSource::getLanguage instead of $wgLang Found two places, where $wgLang is used inside a ContextSource. Change-Id: I1881a20d3cd9b50eb4af0cd588451ed941f936fa --- M includes/OutputPage.php M includes/api/ApiQueryAllMessages.php 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/52982/1 diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 62219e2..6bcc625 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3400,8 +3400,7 @@ * @return string */ public function buildCssLinks() { - global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, - $wgLang, $wgContLang; + global $wgUseSiteCss, $wgAllowUserCss, $wgAllowUserCssPrefs, $wgContLang; $this->getSkin()->setupSkinUserCss( $this ); @@ -3435,7 +3434,7 @@ // 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 b0ecca8..0555a39 100644 --- a/includes/api/ApiQueryAllMessages.php +++ b/includes/api/ApiQueryAllMessages.php @@ -39,8 +39,7 @@ $params = $this->extractRequestParams(); if ( is_null( $params['lang'] ) ) { - global $wgLang; - $langObj = $wgLang; + $langObj = $this->getLanguage(); } else { $langObj = Language::factory( $params['lang'] ); } -- To view, visit https://gerrit.wikimedia.org/r/52982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1881a20d3cd9b50eb4af0cd588451ed941f936fa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits