Mjbmr has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/233101

Change subject: Setup defines.php
......................................................................

Setup defines.php

Change-Id: I01d2625d52b34a192ad6550478f2f397d3135138
---
M Gadgets.namespaces.php
M Gadgets.php
A defines.php
3 files changed, 13 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gadgets 
refs/changes/01/233101/1

diff --git a/Gadgets.namespaces.php b/Gadgets.namespaces.php
index 8029165..7881193 100644
--- a/Gadgets.namespaces.php
+++ b/Gadgets.namespaces.php
@@ -1,13 +1,8 @@
 <?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 );
-}
+require_once __DIR__ . '/defines.php';
+
+$namespaceNames = array();
 
 $namespaceNames['azb'] = array(
        NS_GADGET => 'آلت',
diff --git a/Gadgets.php b/Gadgets.php
index 723ce29..a24aab2 100644
--- a/Gadgets.php
+++ b/Gadgets.php
@@ -2,6 +2,7 @@
 
 if ( function_exists( 'wfLoadExtension' ) ) {
        wfLoadExtension( 'Gadgets' );
+       require_once __DIR__ . '/defines.php';
        // Keep i18n globals so mergeMessageFileList.php doesn't break
        $wgMessagesDirs['Gadgets'] = __DIR__ . '/i18n';
        $wgExtensionMessagesFiles['GadgetsAlias'] = __DIR__ . 
'/Gadgets.alias.php';
diff --git a/defines.php b/defines.php
new file mode 100644
index 0000000..c2a58ae
--- /dev/null
+++ b/defines.php
@@ -0,0 +1,9 @@
+<?php
+
+// 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 );
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/233101
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01d2625d52b34a192ad6550478f2f397d3135138
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gadgets
Gerrit-Branch: master
Gerrit-Owner: Mjbmr <mjb...@gmail.com>

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

Reply via email to