From 06091efcd057d86db397297e45821cda4cf35f1c Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Wed, 27 Jul 2022 21:00:53 +0100 Subject: [PATCH] Limit ULSPosition check to non-Vector 2022 skins I'm not sure what this is for, but it's definitely not needed in Vector 2022 skin. It also prevents the uls-after-portlet-link element from appearing inside the language button when ULS is disabled. Bug: T275147 Change-Id: I8f6c1361040b72107f2d45bfc18e22d6b8f2021c --- includes/Hooks.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Hooks.php b/includes/Hooks.php index 75a1c859..cdfd8a18 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -485,7 +485,8 @@ class Hooks implements return; } - if ( $this->config->get( 'ULSPosition' ) !== 'interlanguage' ) { + // @todo: document what this block is for. + if ( $skin->getSkinName() !== 'vector-2022' && $this->config->get( 'ULSPosition' ) !== 'interlanguage' ) { return; } @@ -494,7 +495,7 @@ class Hooks implements } // An empty span will force the language portal to always display in - // the skins that support it! e.g. Vector. + // the skins that support it! e.g. Vector. (T275147) if ( count( $skin->getLanguages() ) === 0 ) { // If no languages force it on. $content .= Html::element(