From afb1310c6526370cd3ca9b4b654770f4e2dfbe48 Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Thu, 27 Mar 2014 14:01:56 -0700 Subject: [PATCH] Fix failed attempt at configuration defaults The default needs to be changed later. Oops. Change-Id: Ibcdc646a1e961a428f500d3d57b39c0a905880d2 --- MultimediaViewer.php | 5 +---- MultimediaViewerHooks.php | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/MultimediaViewer.php b/MultimediaViewer.php index 3848f1a83..dd484bfd8 100644 --- a/MultimediaViewer.php +++ b/MultimediaViewer.php @@ -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'; diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php index b459e50b5..f45632d5a 100644 --- a/MultimediaViewerHooks.php +++ b/MultimediaViewerHooks.php @@ -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',