Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

Remove MediaWiki wgExtensionCredits registration #75

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 0 additions & 16 deletions DataTypes.mw.php
Expand Up @@ -7,31 +7,15 @@
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/

namespace DataTypes;

if ( !defined( 'MEDIAWIKI' ) ) {
die( 'Not an entry point.' );
}

$GLOBALS['wgExtensionCredits']['datavalues'][] = [
'path' => __DIR__,
'name' => 'DataTypes',
'version' => DataTypes_VERSION,
'author' => [
'The Wikidata team',
],
'url' => 'https://github.com/wmde/DataTypes',
'descriptionmsg' => 'datatypes-desc',
'license-name' => 'GPL-2.0+'
];

$GLOBALS['wgMessagesDirs']['DataTypes'] = __DIR__ . '/i18n';

$GLOBALS['wgHooks']['UnitTestsList'][] = function( array &$paths ) {
$paths[] = __DIR__ . '/tests/Modules/';
$paths[] = __DIR__ . '/tests/Phpunit/';

return true;
};

// Resource Loader module registration
Expand Down
11 changes: 1 addition & 10 deletions DataTypes.php
Expand Up @@ -7,15 +7,6 @@
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/

namespace DataTypes;

if ( defined( 'DataTypes_VERSION' ) ) {
// Do not initialize more than once.
return 1;
}

define( 'DataTypes_VERSION', '1.1.0' );

if ( defined( 'MEDIAWIKI' ) ) {
include __DIR__ . '/DataTypes.mw.php';
require_once __DIR__ . '/DataTypes.mw.php';
}
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "data-values/data-types",
"type": "library",
"description": "PHP library defining the DataTypes\\DataType class of which instances represent a type of value, such as \"positive integer\" or \"percentage\".",
"description": "Collection of data type definitions",
"keywords": [
"datavalues",
"datatypes"
Expand Down
1 change: 0 additions & 1 deletion i18n/en.json
Expand Up @@ -4,7 +4,6 @@
"Jeroen De Dauw"
]
},
"datatypes-desc": "Collection of data type definitions",
"datatypes-type-string": "String",
"datatypes-type-quantity": "Quantity",
"datatypes-type-monolingualtext": "Monolingual text",
Expand Down
1 change: 0 additions & 1 deletion i18n/qqq.json
Expand Up @@ -6,7 +6,6 @@
"Umherirrender"
]
},
"datatypes-desc": "{{desc|name=Data Types|url=https://www.mediawiki.org/wiki/Extension:DataTypes}}",
"datatypes-type-string": "The name of a data type.\n{{Identical|String}}",
"datatypes-type-quantity": "The name of a data type for quantities (proper name, capitalised in English; first letter capitalised anyway in this message and relatives).\n{{Identical|Quantity}}",
"datatypes-type-monolingualtext": "The name of a data type.\n{{Identical|Monolingual text}}",
Expand Down