Paladox has uploaded a new change for review.

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

Change subject: Add full define support in extension registration.
......................................................................

Add full define support in extension registration.

This how it is now set.

"define": [
"Example": "example"
]

It can also have mutiple defines now.

This is how an array should be set.

"define": [
"Example": "example",
"Example2": "Example2"
]

Change-Id: I3d8f2dcbc97e284223741d67008b34ae522c9564
---
M includes/registration/ExtensionProcessor.php
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/262709/1

diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index aac0c799..7c7eb2e 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -90,6 +90,7 @@
         * @var array
         */
        protected static $notAttributes = array(
+               'define',
                'callback',
                'Hooks',
                'namespaces',
@@ -152,6 +153,11 @@
         * @return array
         */
        public function extractInfo( $path, array $info, $version ) {
+               if ( isset( $info['define'] ) ) {
+                       foreach ( $info['define'] as $name => $val ) {
+                               $this->defines[$name] = $val;
+                       }
+               }
                $this->extractConfig( $info );
                $this->extractHooks( $info );
                $dir = dirname( $path );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d8f2dcbc97e284223741d67008b34ae522c9564
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to