From 76bf85a3e48a77d9b24eea30a9a3a0c98926c9b7 Mon Sep 17 00:00:00 2001 From: Niharika Kohli Date: Fri, 7 Mar 2014 10:20:59 +0000 Subject: [PATCH] Enable compact links feature when ULS position is "personal" Placing a check to not allow feature to appear in beta feature list if there are no interlanguage links in wiki Bug: 62361 Change-Id: I8fff949539f40953845c8ee695006ff3f4ea8241 --- UniversalLanguageSelector.hooks.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/UniversalLanguageSelector.hooks.php b/UniversalLanguageSelector.hooks.php index f8747856..27b224e7 100644 --- a/UniversalLanguageSelector.hooks.php +++ b/UniversalLanguageSelector.hooks.php @@ -64,7 +64,6 @@ class UniversalLanguageSelectorHooks { // If compact ULS beta feature is enabled if ( $wgULSCompactLinks && - $wgULSPosition === 'interlanguage' && class_exists( 'BetaFeatures' ) && BetaFeatures::isFeatureEnabled( $out->getUser(), 'uls-compact-links' ) ) { @@ -337,8 +336,8 @@ class UniversalLanguageSelectorHooks { } public static function onGetBetaFeaturePreferences( $user, &$prefs ) { - global $wgExtensionAssetsPath, $wgULSCompactLinks; - if ( $wgULSCompactLinks ) { + global $wgExtensionAssetsPath, $wgULSCompactLinks, $wgHideInterlanguageLinks, $wgInterwikiMagic; + if ( $wgULSCompactLinks && $wgInterwikiMagic == true && $wgHideInterlanguageLinks == false) { $prefs['uls-compact-links'] = array( 'label-message' => 'uls-betafeature-label', 'desc-message' => 'uls-betafeature-desc',