r93751 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93750‎ | r93751 | r93752 >
Date:14:27, 2 August 2011
Author:mah
Status:reverted (Comments)
Tags:
Comment:
Fixes Bug #29311 - [OutputPage] Create a method to remove items from mModules

Patch from John Du Hart, reviewed by Roan, Applying at Roan's request.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -441,6 +441,22 @@
442442 }
443443
444444 /**
 445+ * Remove one or more modules recognized by the resource loader.
 446+ *
 447+ * @param $modules Mixed: module name (string) or array of module names
 448+ */
 449+ public function removeModules( $modules ) {
 450+ $this->mModules = array_diff( $this->mModules, (array)$modules );
 451+ }
 452+
 453+ /**
 454+ * Removes all modules for resource loader.
 455+ */
 456+ public function resetModules() {
 457+ $this->mModules = array();
 458+ }
 459+
 460+ /**
445461 * Get the list of module JS to include on this page
446462 *
447463 * @param $filter
@@ -2571,7 +2587,7 @@
25722588 } else {
25732589 # @todo FIXME: This means that User:Me/Common.js doesn't load when previewing
25742590 # User:Me/Vector.js, and vice versa (bug 26283)
2575 -
 2591+
25762592 // We can't do $userScripts[] = 'user'; because the user module would end up
25772593 // being wrapped in a closure, so load it raw like 'site'
25782594 $scripts .= $this->makeResourceLoaderLink( 'user', ResourceLoaderModule::TYPE_SCRIPTS );

Follow-up revisions

RevisionCommit summaryAuthorDate
r94329Reverting r93751 per r93751 CR.krinkle08:21, 12 August 2011

Comments

#Comment by Krinkle (talk | contribs)   07:00, 5 August 2011

I'm suggesting to revert this, see also comment left here. What do you think ?

#Comment by Catrope (talk | contribs)   13:13, 10 August 2011

Since you're the one that requested this feature in the first place, feel free.

Status & tagging log