mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-23 23:13:27 +00:00
Set up "Gadget" and "Gadget definition" namespaces
Register the "Gadget", "Gadget definition", and their respective talk namespaces. It will not be possible to create any pages in the Gadget and Gadget definition namespaces due to the "gadgets-edit" and "gadgets- definition-edit" rights not being granted to any groups. Depends on Iaf8b44d02adf9 in MediaWiki core. Change-Id: Ia88c774cc0decc252a4a4277d14822048db95801
This commit is contained in:
parent
ee17259501
commit
e6b8b57d9b
17
Gadgets.namespaces.php
Normal file
17
Gadgets.namespaces.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
$namespaceNames = array();
|
||||
|
||||
// For wikis without Gadgets installed.
|
||||
if ( !defined( 'NS_GADGET' ) ) {
|
||||
define( 'NS_GADGET', 2300 );
|
||||
define( 'NS_GADGET_TALK', 2301 );
|
||||
define( 'NS_GADGET_DEFINITION', 2302 );
|
||||
define( 'NS_GADGET_DEFINITION_TALK', 2303 );
|
||||
}
|
||||
|
||||
$namespaceNames['en'] = array(
|
||||
NS_GADGET => 'Gadget',
|
||||
NS_GADGET_TALK => 'Gadget_talk',
|
||||
NS_GADGET_DEFINITION => 'Gadget_definition',
|
||||
NS_GADGET_DEFINITION_TALK => 'Gadget_definition_talk',
|
||||
);
|
|
@ -8,6 +8,35 @@
|
|||
"descriptionmsg": "gadgets-desc",
|
||||
"license-name": "GPL-2.0+",
|
||||
"type": "other",
|
||||
"namespaces": [
|
||||
{
|
||||
"id": 2300,
|
||||
"constant": "NS_GADGET",
|
||||
"name": "Gadget",
|
||||
"protection": "gadgets-edit"
|
||||
},
|
||||
{
|
||||
"id": 2301,
|
||||
"constant": "NS_GADGET_TALK",
|
||||
"name": "Gadget_talk"
|
||||
},
|
||||
{
|
||||
"id": 2302,
|
||||
"constant": "NS_GADGET_DEFINITION",
|
||||
"name": "Gadget_definition",
|
||||
"protection": "gadgets-definition-edit",
|
||||
"capitallinkoverride": false
|
||||
},
|
||||
{
|
||||
"id": 2303,
|
||||
"constant": "NS_GADGET_DEFINITION_TALK",
|
||||
"name": "Gadget_definition_talk"
|
||||
}
|
||||
],
|
||||
"AvailableRights": [
|
||||
"gadgets-edit",
|
||||
"gadgets-definition-edit"
|
||||
],
|
||||
"SpecialPages": {
|
||||
"Gadgets": "SpecialGadgets"
|
||||
},
|
||||
|
@ -21,7 +50,8 @@
|
|||
]
|
||||
},
|
||||
"ExtensionMessagesFiles": {
|
||||
"GadgetsAlias": "Gadgets.alias.php"
|
||||
"GadgetsAlias": "Gadgets.alias.php",
|
||||
"GadgetsNamespaces": "Gadgets.namespaces.php"
|
||||
},
|
||||
"AutoloadClasses": {
|
||||
"ApiQueryGadgetCategories": "api/ApiQueryGadgetCategories.php",
|
||||
|
|
|
@ -35,5 +35,9 @@
|
|||
"apihelp-query+gadgets-example-2": "Get a list of gadgets with all possible properties",
|
||||
"apihelp-query+gadgets-example-3": "Get a list of gadgets belonging to category \"foo\"",
|
||||
"apihelp-query+gadgets-example-4": "Get information about gadgets \"foo\" and \"bar\"",
|
||||
"apihelp-query+gadgets-example-5": "Get a list of gadgets enabled by current user"
|
||||
"apihelp-query+gadgets-example-5": "Get a list of gadgets enabled by current user",
|
||||
"right-gadgets-edit": "Edit gadget JavaScript and CSS pages",
|
||||
"action-gadgets-edit": "edit this gadget JavaScript or CSS page",
|
||||
"right-gadgets-definition-edit": "Edit gadget definitions",
|
||||
"action-gadgets-definition-edit": "edit this gadget definition"
|
||||
}
|
||||
|
|
|
@ -46,5 +46,9 @@
|
|||
"apihelp-query+gadgets-example-2": "{{doc-apihelp-example|query+gadgets}}",
|
||||
"apihelp-query+gadgets-example-3": "{{doc-apihelp-example|query+gadgets}}",
|
||||
"apihelp-query+gadgets-example-4": "{{doc-apihelp-example|query+gadgets}}",
|
||||
"apihelp-query+gadgets-example-5": "{{doc-apihelp-example|query+gadgets}}"
|
||||
"apihelp-query+gadgets-example-5": "{{doc-apihelp-example|query+gadgets}}",
|
||||
"right-gadgets-edit": "{{doc-right|gadgets-edit}}",
|
||||
"action-gadgets-edit": "{{doc-action|gadgets-edit}}",
|
||||
"right-gadgets-definition-edit": "{{doc-right|gadgets-definition-edit}}",
|
||||
"action-gadgets-definition-edit": "{{doc-action|gadgets-definition-edit}}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue