Follow-up Ia268c3a49: Actually hide the BF behind a feature flag

Change-Id: I9bfbfb4512bc6d5c96cdd8e7f75056f0e26b2016
This commit is contained in:
James D. Forrester
2014-03-06 17:26:26 -08:00
parent 8360d7d54c
commit ba97f53114

View File

@@ -45,7 +45,7 @@ class UniversalLanguageSelectorHooks {
* Hook: BeforePageDisplay * Hook: BeforePageDisplay
*/ */
public static function addModules( $out, $skin ) { public static function addModules( $out, $skin ) {
global $wgULSPosition, $wgULSGeoService, $wgULSEventLogging; global $wgULSCompactLinks, $wgULSPosition, $wgULSGeoService, $wgULSEventLogging;
// Load the style for users without JS, to hide the useless links // Load the style for users without JS, to hide the useless links
$out->addModuleStyles( 'ext.uls.nojs' ); $out->addModuleStyles( 'ext.uls.nojs' );
@@ -337,17 +337,19 @@ class UniversalLanguageSelectorHooks {
} }
public static function onGetBetaFeaturePreferences( $user, &$prefs ) { public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
global $wgExtensionAssetsPath; global $wgExtensionAssetsPath, $wgULSCompactLinks;
$prefs['uls-compact-links'] = array( if ( $wgULSCompactLinks ) {
'label-message' => 'uls-betafeature-label', $prefs['uls-compact-links'] = array(
'desc-message' => 'uls-betafeature-desc', 'label-message' => 'uls-betafeature-label',
'screenshot' => $wgExtensionAssetsPath . 'desc-message' => 'uls-betafeature-desc',
'/UniversalLanguageSelector/resources/images/compact-links-ltr.png', 'screenshot' => $wgExtensionAssetsPath .
'info-link' => '/UniversalLanguageSelector/resources/images/compact-links-ltr.png',
'https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links', 'info-link' =>
'discussion-link' => 'https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links',
'https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector/Design/Interlanguage_links', 'discussion-link' =>
); 'https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector/Design/Interlanguage_links',
);
}
} }
/** /**