X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoader.php;h=f051cd4b0789f9c8c8a993c777ba0cd4d0a3ced4;hb=640cc31ebef6749384f8bf16566bf98aef36a147;hp=5712692d6fc82719c215b6e50fa35620bc8b94f5;hpb=6c1cfca4c3536e05008e51f5754900574c36adb4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 5712692d6f..f051cd4b07 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -254,9 +254,6 @@ class ResourceLoader implements LoggerAwareInterface { // Add 'local' source first $this->addSource( 'local', $config->get( 'LoadScript' ) ); - // Add other sources - $this->addSource( $config->get( 'ResourceLoaderSources' ) ); - // Register core modules $this->register( include "$IP/resources/Resources.php" ); // Register extension modules @@ -322,8 +319,6 @@ class ResourceLoader implements LoggerAwareInterface { * @throws MWException If a duplicate module registration is attempted * @throws MWException If a module name contains illegal characters (pipes or commas) * @throws MWException If something other than a ResourceLoaderModule is being registered - * @return bool False if there were any errors, in which case one or more modules were - * not registered */ public function register( $name, $info = null ) { $moduleSkinStyles = $this->config->get( 'ResourceModuleSkinStyles' ); @@ -1163,11 +1158,9 @@ MESSAGE; // Use a linebreak between module script and state script (T162719) $out = $this->ensureNewline( $out ) . $stateScript; } - } else { - if ( $states ) { - $this->errors[] = 'Problematic modules: ' - . self::encodeJsonForScript( $states ); - } + } elseif ( $states ) { + $this->errors[] = 'Problematic modules: ' + . self::encodeJsonForScript( $states ); } return $out; @@ -1452,7 +1445,7 @@ MESSAGE; } } - array_walk( $modules, [ 'self', 'trimArray' ] ); + array_walk( $modules, [ self::class, 'trimArray' ] ); return Xml::encodeJsCall( 'mw.loader.register',