MW 1.35: Re-add class attribute for ULS
Without the class attribute, the ULS does not open on MW <= 1.35. This was changed in Ie9e30af5468aea9803d77c9a36e480ba2b2e86a0 Bug: T294021 Change-Id: I1bcf4e442e85f8848c5e4ff5609204602265b949
This commit is contained in:
@@ -220,6 +220,17 @@ class UniversalLanguageSelectorHooks {
|
|||||||
|
|
||||||
// The element id will be 'pt-uls'
|
// The element id will be 'pt-uls'
|
||||||
$langCode = $context->getLanguage()->getCode();
|
$langCode = $context->getLanguage()->getCode();
|
||||||
|
|
||||||
|
if ( version_compare( MW_VERSION, '1.36', '<' ) ) {
|
||||||
|
return [
|
||||||
|
'uls' => [
|
||||||
|
'text' => Language::fetchLanguageName( $langCode ),
|
||||||
|
'href' => '#',
|
||||||
|
'class' => 'uls-trigger',
|
||||||
|
'active' => true
|
||||||
|
]
|
||||||
|
] + $personal_urls;
|
||||||
|
} else {
|
||||||
return [
|
return [
|
||||||
'uls' => [
|
'uls' => [
|
||||||
'text' => Language::fetchLanguageName( $langCode ),
|
'text' => Language::fetchLanguageName( $langCode ),
|
||||||
@@ -233,6 +244,7 @@ class UniversalLanguageSelectorHooks {
|
|||||||
]
|
]
|
||||||
] + $personal_urls;
|
] + $personal_urls;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $preferred
|
* @param array $preferred
|
||||||
|
|||||||
Reference in New Issue
Block a user