Put new compact language links Beta Feature behind a feature flag

Add new $wgULSCompactLinks feature flag, defaulting to false (as is standard
for Beta Features). Only allow enabling of the feature if ULS position is
'interlanguage'.

Change-Id: Ia268c3a49b5aa14b6a00e33c7f01a61eba48e776
This commit is contained in:
Niharika Kohli
2014-03-06 16:22:37 +00:00
committed by James D. Forrester
parent fd92954e1c
commit 7f405134c7
2 changed files with 13 additions and 1 deletions

View File

@@ -63,7 +63,9 @@ class UniversalLanguageSelectorHooks {
$out->addModules( 'ext.uls.init' );
// If compact ULS beta feature is enabled
if ( class_exists( 'BetaFeatures' ) &&
if ( $wgULSCompactLinks &&
$wgULSPosition === 'interlanguage' &&
class_exists( 'BetaFeatures' ) &&
BetaFeatures::isFeatureEnabled( $out->getUser(), 'uls-compact-links' )
) {
$out->addModules( 'ext.uls.compactlinks' );