Merge two $wgExtensionFunctions

Change-Id: I8695446ae9f8aea56dcda4a0d6d5787e97d77217
This commit is contained in:
Kunal Mehta 2014-09-24 21:28:39 -07:00 committed by Gergő Tisza
parent 0caa1c4ddc
commit 268584a99e

View file

@ -930,7 +930,8 @@ $wgResourceModules += array(
);
$wgExtensionFunctions[] = function () {
global $wgResourceModules, $wgEventLoggingSchemas;
global $wgResourceModules, $wgEventLoggingSchemas,
$wgMediaViewerEnableByDefault, $wgDefaultUserOptions;
if ( isset( $wgResourceModules['ext.eventLogging'] ) ) {
$wgEventLoggingSchemas[ 'MediaViewer' ] = 9989959;
@ -942,6 +943,11 @@ $wgExtensionFunctions[] = function () {
$wgResourceModules['mmv.logging.Performance']['dependencies'][] = 'ext.eventLogging';
$wgResourceModules['mmv.logging.DurationLogger']['dependencies'][] = 'ext.eventLogging';
}
if ( $wgMediaViewerEnableByDefault ) {
$wgDefaultUserOptions['multimediaviewer-enable'] = true;
}
};
foreach ( array(
@ -969,13 +975,6 @@ foreach ( array(
$wgAutoloadClasses['MultimediaViewerHooks'] = __DIR__ . '/MultimediaViewerHooks.php';
$wgExtensionFunctions[] = function () {
global $wgMediaViewerEnableByDefault, $wgDefaultUserOptions;
if ( $wgMediaViewerEnableByDefault ) {
$wgDefaultUserOptions['multimediaviewer-enable'] = true;
}
};
$wgHooks['GetPreferences'][] = 'MultimediaViewerHooks::getPreferences';
$wgHooks['GetBetaFeaturePreferences'][] = 'MultimediaViewerHooks::getBetaPreferences';
$wgHooks['BeforePageDisplay'][] = 'MultimediaViewerHooks::getModulesForArticle';