Merge "Updated ParserCache doc types"
[lhc/web/wiklou.git] / includes / registration / ExtensionProcessor.php
index a2dcd59..4b9a754 100644 (file)
@@ -24,8 +24,8 @@ class ExtensionProcessor implements Processor {
                'ContentHandlers',
                'ConfigRegistry',
                'RateLimits',
-               'ParserTestFiles',
                'RecentChangesFlags',
+               'MediaHandlers',
                'ExtensionFunctions',
                'ExtensionEntryPointListFiles',
                'SpecialPages',
@@ -44,6 +44,7 @@ class ExtensionProcessor implements Processor {
                'APIMetaModules',
                'APIPropModules',
                'APIListModules',
+               'ValidSkinNames',
        );
 
        /**
@@ -53,6 +54,7 @@ class ExtensionProcessor implements Processor {
         */
        protected static $creditsAttributes = array(
                'name',
+               'namemsg',
                'author',
                'version',
                'url',
@@ -120,6 +122,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';
@@ -192,15 +195,17 @@ class ExtensionProcessor implements Processor {
                        $defaultPaths['localBasePath'] = "$dir/{$defaultPaths['localBasePath']}";
                }
 
-               if ( isset( $info['ResourceModules'] ) ) {
-                       foreach ( $info['ResourceModules'] as $name => $data ) {
-                               if ( isset( $data['localBasePath'] ) ) {
-                                       $data['localBasePath'] = "$dir/{$data['localBasePath']}";
+               foreach ( array( 'ResourceModules', 'ResourceModuleSkinStyles' ) as $setting ) {
+                       if ( isset( $info[$setting] ) ) {
+                               foreach ( $info[$setting] as $name => $data ) {
+                                       if ( isset( $data['localBasePath'] ) ) {
+                                               $data['localBasePath'] = "$dir/{$data['localBasePath']}";
+                                       }
+                                       if ( $defaultPaths ) {
+                                               $data += $defaultPaths;
+                                       }
+                                       $this->globals["wg$setting"][$name] = $data;
                                }
-                               if ( $defaultPaths ) {
-                                       $data += $defaultPaths;
-                               }
-                               $this->globals['wgResourceModules'][$name] = $data;
                        }
                }
        }
@@ -265,6 +270,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