mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateStyles
synced 2024-11-27 17:50:29 +00:00
Avoid using $wgContLang
Change-Id: I98a60c71f08b8bf210cbcbc6a6e1b0d50c4138db
This commit is contained in:
parent
169e618357
commit
7a6d9949e4
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue