Do not allow setting deprecated $wgSpecialPageGroups over extension.json
[lhc/web/wiklou.git] / includes / registration / ExtensionProcessor.php
index a5349fb..0f359c8 100644 (file)
@@ -24,12 +24,11 @@ class ExtensionProcessor implements Processor {
                'ContentHandlers',
                'ConfigRegistry',
                'RateLimits',
-               'ParserTestFiles',
                'RecentChangesFlags',
+               'MediaHandlers',
                'ExtensionFunctions',
                'ExtensionEntryPointListFiles',
                'SpecialPages',
-               'SpecialPageGroups',
                'JobClasses',
                'LogTypes',
                'LogRestrictions',
@@ -122,6 +121,7 @@ class ExtensionProcessor implements Processor {
                $this->extractMessagesDirs( $dir, $info );
                $this->extractNamespaces( $info );
                $this->extractResourceLoaderModules( $dir, $info );
+               $this->extractParserTestFiles( $dir, $info );
                if ( isset( $info['callback'] ) ) {
                        $this->callbacks[] = $info['callback'];
                        $this->processed[] = 'callback';
@@ -151,8 +151,10 @@ class ExtensionProcessor implements Processor {
 
        protected function extractHooks( array $info ) {
                if ( isset( $info['Hooks'] ) ) {
-                       foreach ( $info['Hooks'] as $name => $callable ) {
-                               $this->globals['wgHooks'][$name][] = $callable;
+                       foreach ( $info['Hooks'] as $name => $value ) {
+                               foreach ( (array)$value as $callback ) {
+                                       $this->globals['wgHooks'][$name][] = $callback;
+                               }
                        }
                        $this->processed[] = 'Hooks';
                }
@@ -269,6 +271,15 @@ class ExtensionProcessor implements Processor {
                }
        }
 
+       protected function extractParserTestFiles( $dir, array $info ) {
+               if ( isset( $info['ParserTestFiles'] ) ) {
+                       foreach ( $info['ParserTestFiles'] as $path ) {
+                               $this->globals['wgParserTestFiles'][] = "$dir/$path";
+                       }
+                       $this->processed[] = 'ParserTestFiles';
+               }
+       }
+
        /**
         * @param string $name
         * @param mixed $value