mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Fix failed attempt at configuration defaults
The default needs to be changed later. Oops. Change-Id: Ibcdc646a1e961a428f500d3d57b39c0a905880d2
This commit is contained in:
parent
a4f6b71a9a
commit
afb1310c65
|
@ -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';
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue