Set language URLs to empty for older version of skins
During MLEB 2020.07 release testing noticed that if $wgULSPosition is interlanguage, the ULS was not appearing. Revert some of the changes introduced in I2843edde1bb45c70911d5acf2f7dafdff3bac53e to fix this Tested this change on, 1. MW 1.34, Timeless (1b22886) 2. MW 1.34, Vector (f39a3f0) 3. MW 1.36, Timeless (e5e188f) 4. MW 1.36, Vector (3926ffa) ULS appears in all scenarios Change-Id: I84feaed26c4e32d74ae90152a2d006648d4d9b64
This commit is contained in:
@@ -486,6 +486,8 @@ class UniversalLanguageSelectorHooks {
|
||||
}
|
||||
|
||||
/**
|
||||
* Kept for backward compatability with MW < 1.35, and older versions of skins
|
||||
* such as Vector and Timeless
|
||||
* @param QuickTemplate $template
|
||||
* @param string $name
|
||||
* @param string &$content
|
||||
@@ -495,7 +497,20 @@ class UniversalLanguageSelectorHooks {
|
||||
string $name,
|
||||
string &$content
|
||||
) {
|
||||
self::onSkinAfterPortlet( $template->getSkin(), $name, $content );
|
||||
global $wgULSPosition;
|
||||
|
||||
if ( $wgULSPosition !== 'interlanguage' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !self::isToolbarEnabled( $template->getSkin()->getUser() ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Set to an empty array, just to make sure that the section appears
|
||||
if ( $template->get( 'language_urls' ) === false ) {
|
||||
$template->set( 'language_urls', [] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user