diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-06-28 21:18:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-06-28 21:18:30 +0000 |
commit | 77d695fe56cb19cc7f6fc871b9fa5633856f25f2 (patch) | |
tree | 8f05fe312c9d148def6be80c2d39f72e18ca7396 /includes | |
parent | 824e7d4d192a0c2a908b0d7e0df2fb95015a1d3f (diff) | |
download | brdo-77d695fe56cb19cc7f6fc871b9fa5633856f25f2.tar.gz brdo-77d695fe56cb19cc7f6fc871b9fa5633856f25f2.tar.bz2 |
- Patch #69341 by chx: remove some SQL queries from the Drupal bootstrap process.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/bootstrap.inc | 2 | ||||
-rw-r--r-- | includes/module.inc | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 946d926b4..0d8ed02ca 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -339,7 +339,7 @@ function page_get_cache() { * The name of the bootstrap hook we wish to invoke. */ function bootstrap_invoke_all($hook) { - foreach (module_list(FALSE, TRUE) as $module) { + foreach (module_list(TRUE, TRUE) as $module) { drupal_load('module', $module); module_invoke($module, $hook); } diff --git a/includes/module.inc b/includes/module.inc index b3c076250..03bc4f8a1 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -45,12 +45,8 @@ function module_list($refresh = FALSE, $bootstrap = TRUE, $sort = FALSE) { static $list, $sorted_list; if ($refresh) { + unset($sorted_list); $list = array(); - $sorted_list = NULL; - } - - if (!$list) { - $list = array('filter' => 'filter', 'node' => 'node', 'system' => 'system', 'user' => 'user', 'watchdog' => 'watchdog'); if ($bootstrap) { $result = db_query("SELECT name, filename, throttle, bootstrap FROM {system} WHERE type = 'module' AND status = 1 AND bootstrap = 1 ORDER BY weight ASC, filename ASC"); } |