Only show in beta feature list when enabled as a betafeature

Bug: T149092
Change-Id: Iab021a8699845cfc302353c453ebdc1c125d7fd9
This commit is contained in:
addshore 2016-10-25 15:21:32 +01:00
parent bb4666ae88
commit c824428d41

View file

@ -116,18 +116,21 @@ class RevisionSliderHooks {
} }
public static function getBetaFeaturePreferences( User $user, array &$prefs ) { public static function getBetaFeaturePreferences( User $user, array &$prefs ) {
global $wgExtensionAssetsPath; $config = MediaWikiServices::getInstance()->getMainConfig();
$extensionAssetsPath = $config->get( 'ExtensionAssetsPath' );
$prefs['revisionslider'] = [ if ( $config->get( 'RevisionSliderBetaFeature' ) ) {
'label-message' => 'revisionslider-beta-feature-message', $prefs['revisionslider'] = [
'desc-message' => 'revisionslider-beta-feature-description', 'label-message' => 'revisionslider-beta-feature-message',
'screenshot' => [ 'desc-message' => 'revisionslider-beta-feature-description',
'ltr' => "$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-ltr.svg", 'screenshot' => [
'rtl' => "$wgExtensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-rtl.svg", 'ltr' => "$extensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-ltr.svg",
], 'rtl' => "$extensionAssetsPath/RevisionSlider/resources/RevisionSlider-beta-features-rtl.svg",
'info-link' => 'https://www.mediawiki.org/wiki/Extension:RevisionSlider', ],
'discussion-link' => 'https://www.mediawiki.org/wiki/Extension_talk:RevisionSlider', 'info-link' => 'https://www.mediawiki.org/wiki/Extension:RevisionSlider',
]; 'discussion-link' => 'https://www.mediawiki.org/wiki/Extension_talk:RevisionSlider',
];
}
} }
public static function onResourceLoaderTestModules( array &$testModules, ResourceLoader $rl ) { public static function onResourceLoaderTestModules( array &$testModules, ResourceLoader $rl ) {