Define unsupported skins

Previously UniversalLanguageSelector relied on the targets system
meaning the modules ext.uls.interface,
ext.uls.interlanguage and ext.uls.pt were
loaded on Minerva desktop skin unnecessarily and silently removed
on MobileFrontend which throws a warning.

Instead of doing this, check the skin

Bug: T237036
Bug: T235712
Change-Id: Ib38b041533cf959c3c4c30decc65869995c254fa
This commit is contained in:
jdlrobson
2020-06-09 16:37:42 -07:00
committed by jenkins-bot
parent dc4937eb1f
commit b5aff8a06b
2 changed files with 13 additions and 1 deletions

View File

@@ -116,8 +116,12 @@ class UniversalLanguageSelectorHooks {
* @param Skin $skin
* Hook: BeforePageDisplay
*/
public static function addModules( OutputPage $out, $skin ) {
public static function addModules( OutputPage $out, Skin $skin ) {
global $wgULSPosition, $wgULSGeoService;
$unsupportedSkins = [ 'minerva' ];
if ( in_array( $skin->getSkinName(), $unsupportedSkins ) ) {
return;
}
// Soft dependency to Wikibase client. Don't enable CLL if links are managed manually.
$excludedLinks = $out->getProperty( 'noexternallanglinks' );