X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderImage.php;h=3878205220d261b777f20520643ae248e09712e3;hp=2b0f5ed353a175edd7c87d4092a5133085f1c69a;hb=172de0b957c9ff16e67fa6231e8913506c0d6568;hpb=e6ff1ff9153fa218015fbdaa5d5c55b0d57008de diff --git a/includes/resourceloader/ResourceLoaderImage.php b/includes/resourceloader/ResourceLoaderImage.php index 2b0f5ed353..3878205220 100644 --- a/includes/resourceloader/ResourceLoaderImage.php +++ b/includes/resourceloader/ResourceLoaderImage.php @@ -55,8 +55,9 @@ class ResourceLoaderImage { private $extension; /** - * @param string $name Image name - * @param string $module Module name + * @param string $name Self-name of the image as known to ResourceLoaderImageModule. + * @param string $module Self-name of the module containing this image. + * Used to find the image in the registry e.g. through a load.php url. * @param string|array $descriptor Path to image file, or array structure containing paths * @param string $basePath Directory to which paths in descriptor refer * @param array $variants @@ -217,7 +218,7 @@ class ResourceLoaderImage { * @param string $script URL to load.php * @param string|null $variant Variant to get the URL for * @param string $format Format to get the URL for, 'original' or 'rasterized' - * @return string + * @return string URL */ public function getUrl( ResourceLoaderContext $context, $script, $variant, $format ) { $query = [ @@ -231,7 +232,8 @@ class ResourceLoaderImage { } // The following parameters are at the end to keep the original order of the parameters. $query['skin'] = $context->getSkin(); - $query['version'] = $context->getVersion(); + $rl = $context->getResourceLoader(); + $query['version'] = $rl->makeVersionQuery( $context, [ $this->getModule() ] ); return wfAppendQuery( $script, $query ); }