Revert "Add OutputPageScriptsForBottomQueue hook"
authorLegoktm <legoktm.wikipedia@gmail.com>
Wed, 30 Jul 2014 00:16:57 +0000 (00:16 +0000)
committerLegoktm <legoktm.wikipedia@gmail.com>
Wed, 30 Jul 2014 00:25:24 +0000 (00:25 +0000)
After some discussion with Roan, it turns out this
hook is unnecessary. The proper solution is to use
addModuleScripts/addModuleStyles instead of a
plain addModules.

This reverts commit e7361de181dcadbcc7c32de92b3498c9fb9d0193.

Bug: 68712
Change-Id: Iadbff5f7fbbc5a08d6336674b12315967f45591d

RELEASE-NOTES-1.24
docs/hooks.txt
includes/OutputPage.php

index 8e6e8f5..9357feb 100644 (file)
@@ -125,8 +125,6 @@ production.
 * Upgrade jQuery Cookie to v1.3.1.
 * (bug 20476) Add a "viewsuppressed" user right to be able to view
   suppressed content but not suppress it ("suppressrevision" right).
-* Added a new hook, "OutputPageScriptsForBottomQueue", to add modules to the
-  bottom queue that should be requested in a dedicated <script> request.
 * (bug 66440) The MediaWiki web installer will now allow you to choose the skins
   to enable (from the ones included in download tarball) and decide which one
   should be the default.
index 83f5136..25f5ad8 100644 (file)
@@ -1871,14 +1871,6 @@ $categories: associative array, keys are category names, values are category
 $links: array, intended to hold the result. Must be an associative array with
   category types as keys and arrays of HTML links as values.
 
-'OutputPageScriptsForBottomQueue': Allows adding modules to the bottom queue
-that should be requested in a dedicated <script> request. In most cases you'll
-want to use OutputPage::addModules instead (from another hook) which allows
-ResourceLoader to better combine requests and allows the module load requests
-to be cached better. Typically you'd only use this for user-specific modules.
-$out: OutputPage instance
-&$modules: Array of modules names to add to the bottom queue
-
 'PageContentInsertComplete': After a new article is created.
 $wikiPage: WikiPage created
 $user: User creating the article
index 9685747..b832a4c 100644 (file)
@@ -2896,7 +2896,7 @@ $templates
 
                // Startup - this will immediately load jquery and mediawiki modules
                $links = array();
-               $links[] = $this->makeResourceLoaderLink( 'startup', ResourceLoaderModule::TYPE_SCRIPTS, /* $useESI =  */ true );
+               $links[] = $this->makeResourceLoaderLink( 'startup', ResourceLoaderModule::TYPE_SCRIPTS, true );
 
                // Load config before anything else
                $links[] = Html::inlineScript(
@@ -3018,14 +3018,6 @@ $templates
                        /* $useESI = */ false, /* $extraQuery = */ array(), /* $loadCall = */ $inHead
                );
 
-               $modules = array();
-               wfRunHooks( 'OutputPageScriptsForBottomQueue', array( $this, &$modules ) );
-               if ( $modules ) {
-                       $links[] = $this->makeResourceLoaderLink( $modules, ResourceLoaderModule::TYPE_COMBINED,
-                               /* $useESI = */ false, /* $extraQuery = */ array(), /* $loadCall = */ $inHead
-                       );
-               }
-
                return self::getHtmlFromLoaderLinks( $links );
        }