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
This commit is contained in:
Niharika Kohli
2014-03-07 10:20:59 +00:00
parent ba97f53114
commit 76bf85a3e4

View File

@@ -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',