From a159ff14445f44eebd6431017de36672db2287fd Mon Sep 17 00:00:00 2001 From: Fomafix Date: Wed, 21 Sep 2016 06:55:04 +0200 Subject: [PATCH] Use an empty array instead of the uls-p-lang-dummy list item (PHP) This change avoids a flash of a list item bullet while loading on skin MonoBook. The JavaScript part of this change is in Id7f429d9d1217316341102e27389711525f17b2d. The JavaScript part should get deployed when the HTML caches of this change has expired. Change-Id: I54a18f5bd85a8261a25e1160dda7a33fbdf3dd7b --- UniversalLanguageSelector.hooks.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index fed40655..a3e1a51b 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -434,12 +434,10 @@ class UniversalLanguageSelectorHooks { return true; } - // A dummy link, just to make sure that the section appears - $template->data['language_urls'][] = [ - 'href' => '#', - 'text' => '', - 'class' => 'uls-p-lang-dummy', - ]; + // Set to an empty array, just to make sure that the section appears + if ( $template->get( 'language_urls' ) === false ) { + $template->set( 'language_urls', [] ); + } return true; }