X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderFileModule.php;h=031541b5590c8b2384d2fc3e567d52ae5c489547;hb=ae031e237eab8e2023d0fe128f9749a8a43ea439;hp=28488712ddbf7f0d2f95e5068fe59f4266b40590;hpb=227a807ef50387393df0641bce0a6cd16e550338;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 28488712dd..031541b559 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -198,10 +198,11 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { * ], * // Scripts to include in debug contexts * 'debugScripts' => [file path string or array of file path strings], - * // For package modules: files to make available for internal require() use - * // 'type' is optional, and will be inferred from the file name extension if omitted - * // 'config' can only be used when 'type' is 'data'; vars are resolved with Config::get() - * // If 'packageFiles' is set, 'scripts' cannot also be set + * // For package modules: files to be made available for internal require() do not + * // need to have 'type' defined; it will be inferred from the file name extension + * // if omitted. 'config' can only be used when 'type' is 'data'; the variables are + * // resolved with Config::get(). The first entry in 'packageFiles' is always the + * // module entry point. If 'packageFiles' is set, 'scripts' cannot also be set. * 'packageFiles' => [ * [file path string], // or: * [ 'name' => [file name], 'file' => [file path], 'type' => 'script'|'data' ], // or: @@ -384,7 +385,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule { if ( $this->packageFiles !== null ) { $packageFiles = $this->getPackageFiles( $context ); if ( $deprecationScript ) { - $mainFile =& $packageFiles['files'][ $packageFiles['main'] ]; + $mainFile =& $packageFiles['files'][$packageFiles['main']]; $mainFile['content'] = $deprecationScript . $mainFile['content']; } return $packageFiles;