Register ext.uls.eventlogger conditionally
The ext.uls.eventlogger module is now registered depending on the configuration variable $wgULSEventLogging. This will prevent the Structuretest Resourcetest to fail, if EventLogging isn't installed on the test system (like on my jenkins environment :P). Change-Id: I1e2545492ec04fb043638765ac42f09da89813e9
This commit is contained in:
@@ -404,7 +404,7 @@ class UniversalLanguageSelectorHooks {
|
||||
* @return boolean true
|
||||
*/
|
||||
public static function onResourceLoaderRegisterModules( ResourceLoader &$resourceLoader ) {
|
||||
global $wgResourceModules;
|
||||
global $wgResourceModules, $wgULSEventLogging;
|
||||
|
||||
if (
|
||||
(
|
||||
@@ -452,6 +452,20 @@ class UniversalLanguageSelectorHooks {
|
||||
) );
|
||||
}
|
||||
|
||||
if ( $wgULSEventLogging ) {
|
||||
$resourceLoader->register( array(
|
||||
'ext.uls.eventlogger' => array(
|
||||
'scripts' => 'js/ext.uls.eventlogger.js',
|
||||
'dependencies' => array(
|
||||
'mediawiki.user',
|
||||
'schema.UniversalLanguageSelector',
|
||||
),
|
||||
'localBasePath' => __DIR__ . '/resources',
|
||||
'remoteExtPath' => 'UniversalLanguageSelector/resources',
|
||||
),
|
||||
) );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user