Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -441,6 +441,22 @@ |
442 | 442 | } |
443 | 443 | |
444 | 444 | /** |
| 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 | + /** |
445 | 461 | * Get the list of module JS to include on this page |
446 | 462 | * |
447 | 463 | * @param $filter |
— | — | @@ -2571,7 +2587,7 @@ |
2572 | 2588 | } else { |
2573 | 2589 | # @todo FIXME: This means that User:Me/Common.js doesn't load when previewing |
2574 | 2590 | # User:Me/Vector.js, and vice versa (bug 26283) |
2575 | | - |
| 2591 | + |
2576 | 2592 | // We can't do $userScripts[] = 'user'; because the user module would end up |
2577 | 2593 | // being wrapped in a closure, so load it raw like 'site' |
2578 | 2594 | $scripts .= $this->makeResourceLoaderLink( 'user', ResourceLoaderModule::TYPE_SCRIPTS ); |