Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/150445

Change subject: Revert "Add OutputPageScriptsForBottomQueue hook"
......................................................................

Revert "Add OutputPageScriptsForBottomQueue hook"

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.

Change-Id: Iadbff5f7fbbc5a08d6336674b12315967f45591d
---
M RELEASE-NOTES-1.24
M docs/hooks.txt
M includes/OutputPage.php
3 files changed, 1 insertion(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/150445/1

diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24
index d76cd29..197fd24 100644
--- a/RELEASE-NOTES-1.24
+++ b/RELEASE-NOTES-1.24
@@ -118,8 +118,6 @@
 * Upgrade jQuery Cookie to v1.2.0.
 * (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 fixes in 1.24 ===
 * (bug 49116) Footer copyright notice is now always displayed in user language
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 3ee1221..065c7d3 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1871,14 +1871,6 @@
 $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
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 19b2240..0dca0da 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2895,7 +2895,7 @@
 
                // 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(
@@ -3016,14 +3016,6 @@
                $links[] = $this->makeResourceLoaderLink( 'user.groups', 
ResourceLoaderModule::TYPE_COMBINED,
                        /* $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 );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/150445
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadbff5f7fbbc5a08d6336674b12315967f45591d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to