Fix EL dependency loading

Do it in an extension function. Cool feature.

Change-Id: I4a11d13d8c0742106ce4dda15b6b3caaa6489421
This commit is contained in:
Mark Holmquist 2013-10-25 16:40:20 -07:00
parent 3b57311a23
commit 476846813e

View file

@ -79,16 +79,21 @@ $wgResourceModules['ext.multimediaViewer'] = array_merge( array(
),
), $moduleInfo );
if ( isset( $wgResourceModules['ext.eventLogging'] ) ) {
$wgResourceModules['schema.MediaViewer'] = array(
'class' => 'ResourceLoaderSchemaModule',
'schema' => 'MediaViewer',
'revision' => 6055641,
);
$wgExtensionFunctions[] = function () {
global $wgResourceModules;
if ( isset( $wgResourceModules['ext.eventLogging'] ) ) {
$wgResourceModules['schema.MediaViewer'] = array(
'class' => 'ResourceLoaderSchemaModule',
'schema' => 'MediaViewer',
'revision' => 6055641,
);
$wgResourceModules['ext.multimediaViewer']['dependencies'][] = 'ext.eventLogging';
$wgResourceModules['ext.multimediaViewer']['dependencies'][] = 'schema.MediaViewer';
}
};
$wgResourceModules['ext.multimediaViewer']['dependencies'][] = 'ext.eventLogging';
$wgResourceModules['ext.multimediaViewer']['dependencies'][] = 'schema.MediaViewer';
}
$wgAutoloadClasses['MultimediaViewerHooks'] = __DIR__ . '/MultimediaViewerHooks.php';
$wgHooks['GetBetaFeaturePreferences'][] = 'MultimediaViewerHooks::getBetaPreferences';