Avoid using $wgContLang

Change-Id: I98a60c71f08b8bf210cbcbc6a6e1b0d50c4138db
This commit is contained in:
Max Semenik 2019-04-04 00:07:20 -07:00 committed by Jforrester
parent 169e618357
commit 7a6d9949e4

View file

@ -279,8 +279,6 @@ class TemplateStylesHooks {
* @suppress SecurityCheck-XSS
*/
public static function handleTag( $text, $params, $parser, $frame ) {
global $wgContLang;
if ( self::getConfig()->get( 'TemplateStylesDisable' ) ) {
return '';
}
@ -356,8 +354,10 @@ class TemplateStylesHooks {
return $parser->extTemplateStylesCache->get( $cacheKey );
}
$targetDir = $parser->getTargetLanguage()->getDir();
$contentDir = $parser->getContentLanguage()->getDir();
$status = $content->sanitize( [
'flip' => $parser->getTargetLanguage()->getDir() !== $wgContLang->getDir(),
'flip' => $targetDir !== $contentDir,
'minify' => !ResourceLoader::inDebugMode(),
'class' => $wrapClass,
'extraWrapper' => $extraWrapper,