summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-07-29 07:09:30 +0000
committerDries Buytaert <dries@buytaert.net>2005-07-29 07:09:30 +0000
commit4103aada8885865f9e099bf1c33f7db58cad864e (patch)
tree81f77fbeee8a53a4db3c1c26c346ec024b09b975 /includes
parent746b24232696bd60a23de3f2f8ec056137b531b5 (diff)
downloadbrdo-4103aada8885865f9e099bf1c33f7db58cad864e.tar.gz
brdo-4103aada8885865f9e099bf1c33f7db58cad864e.tar.bz2
- Patch #27645 by Neil: refactor away module_load_all().
"This function is called in one place, so it can be rolled into the calling function. The return value isn't used so we can remove handling of it. This is executed for every non-cached page view, so the smaller code should save a smallish ammount of memory and time."
Diffstat (limited to 'includes')
-rw-r--r--includes/module.inc24
1 files changed, 4 insertions, 20 deletions
diff --git a/includes/module.inc b/includes/module.inc
index 1eb4aebe7..0fee1cf43 100644
--- a/includes/module.inc
+++ b/includes/module.inc
@@ -8,10 +8,12 @@
/**
* Initialize all modules.
- *
*/
function module_init() {
- module_load_all();
+ // Load all the modules that have been enabled in the system table.
+ foreach (module_list(TRUE, FALSE) as $module) {
+ drupal_load('module', $module);
+ }
module_invoke_all('init');
}
@@ -71,24 +73,6 @@ function module_list($refresh = FALSE, $bootstrap = TRUE) {
}
/**
- * Load all the modules that have been enabled in the system table.
- *
- * @return
- * TRUE if all modules were loaded successfully.
- */
-function module_load_all() {
- $list = module_list(TRUE, FALSE);
- $status = TRUE;
-
- foreach ($list as $module) {
- $status = (drupal_load('module', $module) && $status);
- }
-
- return $status;
-}
-
-
-/**
* Determine whether a given module exists.
*
* @param $module