Merge "registration: Allow extensions to specify which MW core versions they require"
[lhc/web/wiklou.git] / includes / registration / ExtensionProcessor.php
index 1ceded1..a286f6b 100644 (file)
@@ -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;
                                }
                        }
                }