Merge "registration: Apply ResourceFileModulePaths to all modules"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 11 Feb 2015 01:54:50 +0000 (01:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 11 Feb 2015 01:54:50 +0000 (01:54 +0000)
includes/registration/ExtensionProcessor.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php

index bf42aba..a2dcd59 100644 (file)
@@ -197,7 +197,7 @@ class ExtensionProcessor implements Processor {
                                if ( isset( $data['localBasePath'] ) ) {
                                        $data['localBasePath'] = "$dir/{$data['localBasePath']}";
                                }
-                               if ( $defaultPaths && !isset( $data['class'] ) ) {
+                               if ( $defaultPaths ) {
                                        $data += $defaultPaths;
                                }
                                $this->globals['wgResourceModules'][$name] = $data;
index d2254df..b4c225c 100644 (file)
@@ -249,11 +249,14 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
                                                'test.class' => array(
                                                        'class' => 'FooBarModule',
                                                        'extra' => 'argument',
+                                                       'localBasePath' => $dir,
+                                                       'remoteExtPath' => 'FooBar',
                                                ),
                                                'test.class.with.path' => array(
                                                        'class' => 'FooBarPathModule',
                                                        'extra' => 'argument',
                                                        'localBasePath' => $dir,
+                                                       'remoteExtPath' => 'FooBar',
                                                )
                                        ),
                                ),