jenkins-bot has submitted this change and it was merged.

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.

Bug: T147582
Change-Id: Ibe5e1de68f748570e8d95b795b9849c58fe5f5ec
---
M PageForms.php
M extension.json
M includes/PF_Hooks.php
M languages/PF_Namespaces.php
4 files changed, 21 insertions(+), 14 deletions(-)

Approvals:
  Paladox: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/PageForms.php b/PageForms.php
index 2b09dd5..9514165 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 93ee63a..287c2e2 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..c8a1b51 100644
--- a/languages/PF_Namespaces.php
+++ b/languages/PF_Namespaces.php
@@ -12,9 +12,14 @@
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  * @author Yaron Koren
  */
- 
+
 $namespaceNames = array();
 
+if ( !defined( 'PF_NS_FORM' ) ) {
+       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: merged
Gerrit-Change-Id: Ibe5e1de68f748570e8d95b795b9849c58fe5f5ec
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to