Skip to content
Snippets Groups Projects
Commit 4103aada authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- 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."
parent 746b2423
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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');
}
......@@ -70,24 +72,6 @@ function module_list($refresh = FALSE, $bootstrap = TRUE) {
return $list;
}
/**
* 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.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment