mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-24 08:13:38 +00:00
Merge two $wgExtensionFunctions
Change-Id: I8695446ae9f8aea56dcda4a0d6d5787e97d77217
This commit is contained in:
parent
0caa1c4ddc
commit
268584a99e
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue