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
*/
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
$out->addModuleStyles( 'ext.uls.nojs' );
@@ -337,17 +337,19 @@ class UniversalLanguageSelectorHooks {
}
public static function onGetBetaFeaturePreferences( $user, &$prefs ) {
global $wgExtensionAssetsPath;
$prefs['uls-compact-links'] = array(
'label-message' => 'uls-betafeature-label',
'desc-message' => 'uls-betafeature-desc',
'screenshot' => $wgExtensionAssetsPath .
'/UniversalLanguageSelector/resources/images/compact-links-ltr.png',
'info-link' =>
'https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links',
'discussion-link' =>
'https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector/Design/Interlanguage_links',
);
global $wgExtensionAssetsPath, $wgULSCompactLinks;
if ( $wgULSCompactLinks ) {
$prefs['uls-compact-links'] = array(
'label-message' => 'uls-betafeature-label',
'desc-message' => 'uls-betafeature-desc',
'screenshot' => $wgExtensionAssetsPath .
'/UniversalLanguageSelector/resources/images/compact-links-ltr.png',
'info-link' =>
'https://www.mediawiki.org/wiki/Universal_Language_Selector/Design/Interlanguage_links',
'discussion-link' =>
'https://www.mediawiki.org/wiki/Talk:Universal_Language_Selector/Design/Interlanguage_links',
);
}
}
/**