File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -247,17 +247,17 @@ The JavaScript tests can only be run by going to the [`Special:JavaScriptTest` p
247247
248248## Release notes
249249
250- ### Version 1.2.0
250+ ### Version 1.2.1
251251
252252Released on September 7, 2020.
253253
254- * Upgraded viz-network from 7.6 to 8.3
254+ * Added compatibility with MediaWiki 1.31
255255
256- ### Version 1.1.2
256+ ### Version 1.2.0
257257
258258Released on September 7, 2020.
259259
260- * Fixed MediaWiki 1.31 compatibility (1.1.0 regression)
260+ * Upgraded viz-network from 7.6 to 8.3
261261
262262### Version 1.1.1
263263
Original file line number Diff line number Diff line change 4747 "MediaWiki\\ Extension\\ Network\\ Tests\\ " : " tests/php"
4848 },
4949
50+ "callback" : " MediaWiki\\ Extension\\ Network\\ Extension::addMediaWiki131compat" ,
51+
5052 "Hooks" : {
5153 "ParserFirstCallInit" : " MediaWiki\\ Extension\\ Network\\ EntryPoints\\ NetworkFunction::onParserFirstCallInit"
5254 },
5961 "ResourceModules" : {
6062 "ext.network" : {
6163 "dependencies" : [
62- " jquery" ,
63- " mediawiki.api" ,
64+ " mediawiki.api.edit" ,
6465 " mediawiki.Title"
6566 ],
6667 "scripts" : [
Original file line number Diff line number Diff line change @@ -22,4 +22,17 @@ public function newNetworkPresenter(): NetworkPresenter {
2222 return new ParserFunctionNetworkPresenter ();
2323 }
2424
25+ public static function addMediaWiki131compat (): void {
26+ // mediawiki.api.edit is present in 1.31 but not 1.32
27+ // Once Maps requires MW 1.32+, this can be removed after replacing usage of mediawiki.api.edit
28+ if ( version_compare ( $ GLOBALS ['wgVersion ' ], '1.32 ' , '>= ' ) ) {
29+ $ GLOBALS ['wgResourceModules ' ]['mediawiki.api.edit ' ] = [
30+ 'dependencies ' => [
31+ 'mediawiki.api '
32+ ],
33+ 'targets ' => [ 'desktop ' , 'mobile ' ]
34+ ];
35+ }
36+ }
37+
2538}
You can’t perform that action at this time.
0 commit comments