Paladox has uploaded a new change for review.
https://gerrit.wikimedia.org/r/317506
Change subject: Fix namespace configs and fix extension description
......................................................................
Fix namespace configs and fix extension description
Since we have renamed the extension, the namespaces are no longer defined
in SemanticMediaWiki so we define it extension side.
We can also use the namespaces config in extension registration to also
define it too.
Change-Id: Ibe5e1de68f748570e8d95b795b9849c58fe5f5ec
---
M PageForms.php
M extension.json
M includes/PF_Hooks.php
M languages/PF_Namespaces.php
4 files changed, 21 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms
refs/changes/06/317506/1
diff --git a/PageForms.php b/PageForms.php
index d2dc51f..52dd80a 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -78,12 +78,6 @@
define( 'PF_VERSION', '4.0' );
-// SMW defines these namespaces itself.
-if ( !defined( 'PF_NS_FORM' ) ) {
- define( 'PF_NS_FORM', 106 );
- define( 'PF_NS_FORM_TALK', 107 );
-}
-
$GLOBALS['wgExtensionCredits']['specialpage'][] = array(
'path' => __FILE__,
'name' => 'Page Forms',
diff --git a/extension.json b/extension.json
index 10d1b6b..c2fa0ad 100644
--- a/extension.json
+++ b/extension.json
@@ -9,9 +9,23 @@
"..."
],
"url": "https://www.mediawiki.org/wiki/Extension:Page_Forms",
- "descriptionmsg": "PageForms-desc",
+ "descriptionmsg": "pageforms-desc",
"license-name": "GPL-2.0+",
"type": "specialpage",
+ "namespaces": [
+ {
+ "id": 106,
+ "constant": "PF_NS_FORM",
+ "name": "Form",
+ "conditional": true
+ },
+ {
+ "id": 107,
+ "constant": "PF_NS_FORM_TALK",
+ "name": "Form_talk",
+ "conditional": true
+ }
+ ],
"callback": "PFHooks::registerExtension",
"ExtensionFunctions": [
"PFHooks::initialize"
diff --git a/includes/PF_Hooks.php b/includes/PF_Hooks.php
index f654c62..05b52c8 100644
--- a/includes/PF_Hooks.php
+++ b/includes/PF_Hooks.php
@@ -18,12 +18,6 @@
define( 'PF_VERSION', '4.0' );
- if ( !defined( 'PF_NS_FORM' ) ) {
- // SMW defines these namespaces itself.
- define( 'PF_NS_FORM', 106 );
- define( 'PF_NS_FORM_TALK', 107 );
- }
-
$GLOBALS['wgPageFormsIP'] = dirname( __DIR__ ) . '/../';
// Constants for special properties
diff --git a/languages/PF_Namespaces.php b/languages/PF_Namespaces.php
index 601244b..dfd5494 100644
--- a/languages/PF_Namespaces.php
+++ b/languages/PF_Namespaces.php
@@ -15,6 +15,12 @@
$namespaceNames = array();
+if ( !defined( 'PF_NS_FORM' ) ) {
+ // SMW defines these namespaces itself.
+ define( 'PF_NS_FORM', 106 );
+ define( 'PF_NS_FORM_TALK', 107 );
+}
+
/**
* @author Meno25
*/
--
To view, visit https://gerrit.wikimedia.org/r/317506
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe5e1de68f748570e8d95b795b9849c58fe5f5ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits