Revert "Add language settings button inside dropdown for non-content pages"
This reverts commit 5d576d05b4.
Reason for revert: Using Skin::getTemplateData method outside the
skin rendering layer is dangerous and likely a performance issue as
it means generating the rendering data twice and makes various hooks
execute multiple times.
It has caused T326538 and may be causing other issues.
Bug: T326538
Change-Id: Ie5d079deae414eb199d2a40b98d04b57439eaac4
This commit is contained in:
@@ -170,10 +170,6 @@ class Hooks implements
|
||||
if ( $this->isEnabled() ) {
|
||||
// Enable UI language selection for the user.
|
||||
$out->addModules( 'ext.uls.interface' );
|
||||
|
||||
$templateData = $skin->getTemplateData();
|
||||
$isLanguageSelectorEmpty = $templateData[ 'data-lang-btn' ][ 'is-language-selector-empty' ] ?? false;
|
||||
$config[ 'wgULSisLanguageSelectorEmpty' ] = $isLanguageSelectorEmpty;
|
||||
}
|
||||
|
||||
// This is added here, and not in onResourceLoaderGetConfigVars to allow skins and extensions
|
||||
|
||||
Reference in New Issue
Block a user