jenkins-bot has submitted this change and it was merged.

Change subject: Compact links beta feature conditions sync
......................................................................


Compact links beta feature conditions sync

Enforce same conditions on enabling as on showing the BetaFeatures preference
to the user, for the sake of clarity.

Bug: 62362
Change-Id: I11ee32a90ba8ecca9136a6ff33581bf6d72240bd
---
M UniversalLanguageSelector.hooks.php
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Santhosh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 4077484..9f6f950 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -45,7 +45,8 @@
         * Hook: BeforePageDisplay
         */
        public static function addModules( $out, $skin ) {
-               global $wgULSCompactLinks, $wgULSPosition, $wgULSGeoService, 
$wgULSEventLogging;
+               global $wgULSCompactLinks, $wgULSPosition, $wgULSGeoService, 
$wgULSEventLogging,
+                       $wgInterwikiMagic, $wgHideInterlanguageLinks;
 
                // Load the style for users without JS, to hide the useless 
links
                $out->addModuleStyles( 'ext.uls.nojs' );
@@ -62,8 +63,11 @@
                // If the extension is enabled, basic features (API, language 
data) available.
                $out->addModules( 'ext.uls.init' );
 
-               // If compact ULS beta feature is enabled
+               // If compact ULS beta feature is enabled and is actually 
functional
+               // (see onGetBetaFeaturePreferences)
                if ( $wgULSCompactLinks &&
+                       $wgInterwikiMagic === true &&
+                       $wgHideInterlanguageLinks === false &&
                        class_exists( 'BetaFeatures' ) &&
                        BetaFeatures::isFeatureEnabled( $out->getUser(), 
'uls-compact-links' )
                ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/132819
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I11ee32a90ba8ecca9136a6ff33581bf6d72240bd
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nemo bis <federicol...@tiscali.it>
Gerrit-Reviewer: Jsahleen <jsahl...@wikimedia.org>
Gerrit-Reviewer: Nemo bis <federicol...@tiscali.it>
Gerrit-Reviewer: Niharika29 <niharikakohl...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Pginer <pgi...@wikimedia.org>
Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to