X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fresourceloader%2FResourceLoaderClientHtml.php;h=c76ed91f7030df980d2cb89dd86a4e041b62b096;hb=5120937028f768749d058aa91dde82a96de0af1c;hp=06f9841d4475e9d91c09c56f5c27a0686d5bd60c;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/resourceloader/ResourceLoaderClientHtml.php b/includes/resourceloader/ResourceLoaderClientHtml.php index 06f9841d44..c76ed91f70 100644 --- a/includes/resourceloader/ResourceLoaderClientHtml.php +++ b/includes/resourceloader/ResourceLoaderClientHtml.php @@ -149,6 +149,13 @@ class ResourceLoaderClientHtml { continue; } + $context = $this->getContext( $module->getGroup(), ResourceLoaderModule::TYPE_COMBINED ); + if ( $module->isKnownEmpty( $context ) ) { + // Avoid needless request or embed for empty module + $data['states'][$name] = 'ready'; + continue; + } + if ( $module->shouldEmbedModule( $this->context ) ) { // Embed via mw.loader.implement per T36907. $data['embed']['general'][] = $name;