Skip to content

Commit 1778154

Browse files
committed
Merge pull request #55 from wmde/mwcredits
Use extension registration for MediaWiki credits
2 parents 8f12b42 + ccc2c26 commit 1778154

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

init.mw.php

Lines changed: 0 additions & 20 deletions
This file was deleted.

init.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
<?php
22

3-
define( 'WIKIBASE_DATAMODEL_JAVASCRIPT_VERSION', '2.0.1' );
3+
/**
4+
* @deprecated since 3.0
5+
*/
6+
define( 'WIKIBASE_DATAMODEL_JAVASCRIPT_VERSION', '3.0.0' );
47

5-
if ( defined( 'MEDIAWIKI' ) ) {
6-
call_user_func( function() {
7-
require_once __DIR__ . '/init.mw.php';
8-
} );
8+
if ( defined( 'MEDIAWIKI' ) && function_exists( 'wfLoadExtension' ) ) {
9+
wfLoadExtension( 'WikibaseDataModelJavaScript', __DIR__ . '/mediawiki-extension.json' );
10+
11+
include 'resources.php';
12+
include 'resources.test.php';
913
}

mediawiki-extension.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "Wikibase DataModel JavaScript",
3+
"author": [
4+
"[http://www.snater.com H. Snater]"
5+
],
6+
"url": "https://github.com/wmde/WikibaseDataModelJavascript",
7+
"description": "Javascript implementation of the Wikibase data model",
8+
"version": "2.0.0",
9+
"type": "wikibase",
10+
"license-name": "GPL-2.0+",
11+
"manifest_version": 1
12+
}

0 commit comments

Comments
 (0)