Commit 69a066c4 authored by Dries's avatar Dries

- Patch #19895 by Moshe: currently modules can inadvertently load all other...

- Patch #19895 by Moshe: currently modules can inadvertently load all other modules during the bootstrap. this is easy to do by calling a node_load() or module_invoke_all(). this degrades performance for anonymous users when caching is enabled.  With this patch, the module writer will see an php error like "Call to undefined function: drupal_set_html_head()" if this is attempted. basically, unavailable functions are actually reported as unavailable.
parent f98bbea2
......@@ -25,19 +25,20 @@ function module_iterate($function, $argument = '') {
}
/**
* Collect a list of all installed and enabled modules.
* Collect a list of all loaded modules. During the bootstrap, return only
* vital modules. See bootstrap.inc
*
* @param $refresh
* Whether to force the module list to be regenerated (such as after the
* administrator has changed the system settings).
* @param $bootstrap
* Whether to return the reduced set of modules loaded in "bootstrap mode" for
* cached pages. See bootstrap.inc.
* Whether to return the reduced set of modules loaded in "bootstrap mode"
* for cached pages. See bootstrap.inc.
* @return
* An associative array whose keys and values are the names of all loaded
* modules.
*/
function module_list($refresh = FALSE, $bootstrap = FALSE) {
function module_list($refresh = FALSE, $bootstrap = TRUE) {
static $list;
if ($refresh) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment