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:
@@ -64,7 +64,6 @@ class UniversalLanguageSelectorHooks {
|
|||||||
|
|
||||||
// If compact ULS beta feature is enabled
|
// If compact ULS beta feature is enabled
|
||||||
if ( $wgULSCompactLinks &&
|
if ( $wgULSCompactLinks &&
|
||||||
$wgULSPosition === 'interlanguage' &&
|
|
||||||
class_exists( 'BetaFeatures' ) &&
|
class_exists( 'BetaFeatures' ) &&
|
||||||
BetaFeatures::isFeatureEnabled( $out->getUser(), 'uls-compact-links' )
|
BetaFeatures::isFeatureEnabled( $out->getUser(), 'uls-compact-links' )
|
||||||
) {
|
) {
|
||||||
@@ -337,8 +336,8 @@ class UniversalLanguageSelectorHooks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
|
||||||
global $wgExtensionAssetsPath, $wgULSCompactLinks;
|
global $wgExtensionAssetsPath, $wgULSCompactLinks, $wgHideInterlanguageLinks, $wgInterwikiMagic;
|
||||||
if ( $wgULSCompactLinks ) {
|
if ( $wgULSCompactLinks && $wgInterwikiMagic == true && $wgHideInterlanguageLinks == false) {
|
||||||
$prefs['uls-compact-links'] = array(
|
$prefs['uls-compact-links'] = array(
|
||||||
'label-message' => 'uls-betafeature-label',
|
'label-message' => 'uls-betafeature-label',
|
||||||
'desc-message' => 'uls-betafeature-desc',
|
'desc-message' => 'uls-betafeature-desc',
|
||||||
|
|||||||
Reference in New Issue
Block a user