Paladox has uploaded a new change for review.

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

Change subject: Support custom prefix
......................................................................

Support custom prefix

Add $wgDisableWg setting so that it is set extension or skin.

Change-Id: Id2d9b83a1e4a2a4ffd900b84a18be211b647577b
---
M includes/registration/ExtensionProcessor.php
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/231244/1

diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index 68e5a17..1b44e54 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -165,7 +165,11 @@
 
                $this->extractCredits( $path, $info );
                foreach ( $info as $key => $val ) {
-                       if ( in_array( $key, self::$globalSettings ) ) {
+                       global $wgDisableWg;
+                       if ( in_array( $key, self::$globalSettings && 
$wgDisableWg ) ) {
+                               $this->storeToArray( "$key", $val, 
$this->globals );
+                       // Ignore anything that starts with a @
+                       } else ( in_array( $key, self::$globalSettings ) ) {
                                $this->storeToArray( "wg$key", $val, 
$this->globals );
                        // Ignore anything that starts with a @
                        } elseif ( $key[0] !== '@' && !in_array( $key, 
self::$notAttributes )
@@ -305,9 +309,12 @@
         * @param array $info
         */
        protected function extractConfig( array $info ) {
+               global $wgDisableWg;
                if ( isset( $info['config'] ) ) {
                        foreach ( $info['config'] as $key => $val ) {
-                               if ( $key[0] !== '@' ) {
+                               if ( $key[0] !== '@' && $wgDisableWg) {
+                                       $this->globals["$key"] = $val;
+                               } else ( $key[0] !== '@' ) {
                                        $this->globals["wg$key"] = $val;
                                }
                        }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2d9b83a1e4a2a4ffd900b84a18be211b647577b
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