From 983437312b90da6121aac3feba5859e4c0797c49 Mon Sep 17 00:00:00 2001 From: jdlrobson Date: Thu, 9 Dec 2021 12:07:56 -0800 Subject: [PATCH] Don't add language button to sticky header on pages without languages in content In Commons languages appear in sidebar. The language button shouldn't show in the sticky header on these wikis Bug: T297362 Change-Id: I17d283a7c0ad20bdcaf39b234a7fe766880ab28a --- includes/SkinVector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 09b7318..67b36bf 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -416,7 +416,8 @@ class SkinVector extends SkinMustache { $btns[] = self::EDIT_VE_ICON; } return [ - 'data-primary-action' => !$this->shouldHideLanguages() ? $this->getULSButtonData() : null, + 'data-primary-action' => $this->isLanguagesInContent() ? + $this->getULSButtonData() : null, 'data-button-start' => [ 'label' => $this->msg( 'search' ), 'icon' => 'wikimedia-search',