Fix failed attempt at configuration defaults

The default needs to be changed later. Oops.

Change-Id: Ibcdc646a1e961a428f500d3d57b39c0a905880d2
This commit is contained in:
Mark Holmquist 2014-03-27 14:01:56 -07:00
parent a4f6b71a9a
commit afb1310c65
2 changed files with 6 additions and 5 deletions

View file

@ -676,13 +676,10 @@ call_user_func( function() {
$wgAutoloadClasses['MultimediaViewerHooks'] = __DIR__ . '/MultimediaViewerHooks.php';
if ( $wgMediaViewerIsInBeta ) {
$wgHooks['GetBetaFeaturePreferences'][] = 'MultimediaViewerHooks::getBetaPreferences';
}
$wgDefaultUserOptions['multimediaviewer-enable'] = true;
$wgHooks['GetPreferences'][] = 'MultimediaViewerHooks::getPreferences';
$wgHooks['GetBetaFeaturePreferences'][] = 'MultimediaViewerHooks::getBetaPreferences';
$wgHooks['BeforePageDisplay'][] = 'MultimediaViewerHooks::getModulesForArticle';
$wgHooks['CategoryPageView'][] = 'MultimediaViewerHooks::getModulesForCategory';
$wgHooks['ResourceLoaderGetConfigVars'][] = 'MultimediaViewerHooks::resourceLoaderGetConfigVars';

View file

@ -102,7 +102,11 @@ class MultimediaViewerHooks {
// Add a beta preference to gate the feature
public static function getBetaPreferences( $user, &$prefs ) {
global $wgExtensionAssetsPath;
global $wgExtensionAssetsPath, $wgMediaViewerIsInBeta;
if ( !$wgMediaViewerIsInBeta ) {
return true;
}
$prefs['multimedia-viewer'] = array(
'label-message' => 'multimediaviewer-pref',