Minimal fix for broken language trigger in ContentTranslation
Bug: T255331 Change-Id: If81613f6a9784535e25feef56335afb290023749
This commit is contained in:
@@ -135,6 +135,9 @@ class UniversalLanguageSelectorHooks {
|
|||||||
$out->addModules( 'ext.uls.interface' );
|
$out->addModules( 'ext.uls.interface' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is added here, and not in addConfig to allow skins and extensions to vary it
|
||||||
|
// For example, ContentTranslation special pages depend on being able to change it.
|
||||||
|
$out->addJsConfigVars( 'wgULSPosition', $wgULSPosition );
|
||||||
if ( $wgULSPosition === 'personal' ) {
|
if ( $wgULSPosition === 'personal' ) {
|
||||||
$out->addModuleStyles( 'ext.uls.pt' );
|
$out->addModuleStyles( 'ext.uls.pt' );
|
||||||
} else {
|
} else {
|
||||||
@@ -354,7 +357,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
public static function addConfig( array &$vars ) {
|
public static function addConfig( array &$vars ) {
|
||||||
global $wgULSGeoService,
|
global $wgULSGeoService,
|
||||||
$wgULSIMEEnabled, $wgULSWebfontsEnabled,
|
$wgULSIMEEnabled, $wgULSWebfontsEnabled,
|
||||||
$wgULSPosition, $wgULSNoWebfontsSelectors,
|
$wgULSNoWebfontsSelectors,
|
||||||
$wgULSAnonCanChangeLanguage,
|
$wgULSAnonCanChangeLanguage,
|
||||||
$wgULSEventLogging,
|
$wgULSEventLogging,
|
||||||
$wgULSImeSelectors, $wgULSNoImeSelectors,
|
$wgULSImeSelectors, $wgULSNoImeSelectors,
|
||||||
@@ -370,7 +373,6 @@ class UniversalLanguageSelectorHooks {
|
|||||||
|
|
||||||
$vars['wgULSIMEEnabled'] = $wgULSIMEEnabled;
|
$vars['wgULSIMEEnabled'] = $wgULSIMEEnabled;
|
||||||
$vars['wgULSWebfontsEnabled'] = $wgULSWebfontsEnabled;
|
$vars['wgULSWebfontsEnabled'] = $wgULSWebfontsEnabled;
|
||||||
$vars['wgULSPosition'] = $wgULSPosition;
|
|
||||||
$vars['wgULSAnonCanChangeLanguage'] = $wgULSAnonCanChangeLanguage;
|
$vars['wgULSAnonCanChangeLanguage'] = $wgULSAnonCanChangeLanguage;
|
||||||
$vars['wgULSEventLogging'] = $wgULSEventLogging
|
$vars['wgULSEventLogging'] = $wgULSEventLogging
|
||||||
&& ExtensionRegistry::getInstance()->isLoaded( 'EventLogging' );
|
&& ExtensionRegistry::getInstance()->isLoaded( 'EventLogging' );
|
||||||
|
|||||||
Reference in New Issue
Block a user