From 0d2e38375c02c5d330ea4c8c2da300a14f81b2b9 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Tue, 2 Mar 2021 09:01:55 -0800 Subject: [PATCH] Languages should not appear in side bar on modern Vector special pages Follow up to 52edeee Bug: T273144 Change-Id: I22b33d2090dcd814658ecc2f155d86a5b1791fc3 --- includes/SkinVector.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 92978c83f..5f2a33e01 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -182,6 +182,11 @@ class SkinVector extends SkinMustache { $parentData = parent::getTemplateData(); + // Remove language from sidebar if in modern Vector and no languages possible. + if ( !$this->isLegacy() && !$this->canHaveLanguages() ) { + $parentData['data-portlets']['data-languages'] = null; + } + $commonSkinData = array_merge( $parentData, [ 'page-isarticle' => (bool)$out->isArticle(),