Check whether TYPE_COMBINED modules are allowed to be included in the page
authorKunal Mehta <legoktm@gmail.com>
Thu, 24 Jul 2014 23:02:45 +0000 (16:02 -0700)
committerLegoktm <legoktm.wikipedia@gmail.com>
Wed, 30 Jul 2014 01:23:19 +0000 (01:23 +0000)
With the introduction of the OutputPageScriptsForBottomQueue hook,
modules loaded through it are TYPE_COMBINED, which
OutputPage::makeResourceLoaderLink was not checking on whether
or not it was safe to include them.

Change-Id: I33f39a5643b3d05db5a89e62fa6c86d437dea143

includes/OutputPage.php

index fbdde64..64d2bc8 100644 (file)
@@ -2728,6 +2728,8 @@ $templates
                                        && $only == ResourceLoaderModule::TYPE_SCRIPTS )
                                || ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_STYLES )
                                        && $only == ResourceLoaderModule::TYPE_STYLES )
+                               || ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_COMBINED )
+                                       && $only == ResourceLoaderModule::TYPE_COMBINED )
                                || ( $this->mTarget && !in_array( $this->mTarget, $module->getTargets() ) )
                        ) {
                                continue;