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:
Jdlrobson
2023-01-09 20:07:23 +00:00
committed by jenkins-bot
parent d57b0b295e
commit 570a7d3b4e
3 changed files with 0 additions and 59 deletions

View File

@@ -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