Fix issues identified by SpaceBeforeSingleLineComment sniff
[lhc/web/wiklou.git] / includes / registration / ExtensionProcessor.php
index 1ceded1..84e873d 100644 (file)
@@ -58,7 +58,7 @@ class ExtensionProcessor implements Processor {
                'wgRevokePermissions' => 'array_plus_2d',
                'wgHooks' => 'array_merge_recursive',
                // credits are handled in the ExtensionRegistry
-               //'wgExtensionCredits' => 'array_merge_recursive',
+               // 'wgExtensionCredits' => 'array_merge_recursive',
                'wgExtraGenderNamespaces' => 'array_plus',
                'wgNamespacesWithSubpages' => 'array_plus',
                'wgNamespaceContentModels' => 'array_plus',
@@ -315,9 +315,15 @@ class ExtensionProcessor implements Processor {
         */
        protected function extractConfig( array $info ) {
                if ( isset( $info['config'] ) ) {
+                       if ( isset( $info['config']['_prefix'] ) ) {
+                               $prefix = $info['config']['_prefix'];
+                               unset( $info['config']['_prefix'] );
+                       } else {
+                               $prefix = 'wg';
+                       }
                        foreach ( $info['config'] as $key => $val ) {
                                if ( $key[0] !== '@' ) {
-                                       $this->globals["wg$key"] = $val;
+                                       $this->globals["$prefix$key"] = $val;
                                }
                        }
                }