Remove dependencies on deprecated modules 'mediawiki.api.*'
In core, modules 'mediawiki.api.*' got merged into 'mediawiki.api' and deprecated in I0afdc8ab50bc1354bb5099bf39923c07eab0b665 included in MediaWiki 1.32. This change does not increase the version requirement in extension.json to "MediaWiki": ">= 1.32.0" because it adds the removed dependencies for earlier versions of MediaWiki in a hook. Bug: T196802 Bug: T200168 Change-Id: I27dd62fae7a470549dd533f16c145cb023b16181
This commit is contained in:
@@ -462,7 +462,7 @@ class UniversalLanguageSelectorHooks {
|
||||
* @param ResourceLoader $resourceLoader
|
||||
*/
|
||||
public static function onResourceLoaderRegisterModules( ResourceLoader $resourceLoader ) {
|
||||
global $wgULSEventLogging;
|
||||
global $wgULSEventLogging, $wgVersion;
|
||||
|
||||
$modules = [];
|
||||
$modules['ext.uls.compactlinks'] = [
|
||||
@@ -482,6 +482,11 @@ class UniversalLanguageSelectorHooks {
|
||||
'localBasePath' => __DIR__ . '/resources',
|
||||
'remoteExtPath' => 'UniversalLanguageSelector/resources'
|
||||
];
|
||||
if ( version_compare( $wgVersion, '1.32', '<' ) ) {
|
||||
// Support: MediaWiki 1.31 and earlier (T200168)
|
||||
$modules['ext.uls.displaysettings']['dependencies'][] = 'mediawiki.api.parse';
|
||||
$modules['ext.uls.preferences']['dependencies'][] = 'mediawiki.api.options';
|
||||
}
|
||||
|
||||
if ( $wgULSEventLogging ) {
|
||||
$modules['ext.uls.eventlogger'] = [
|
||||
|
||||
Reference in New Issue
Block a user