Commit 5d7a7356 authored by Dries's avatar Dries

- Patch #929178 by carlos8f, chx: module_list() kills system_list() caching.

parent 99ccb2e5
...@@ -65,9 +65,11 @@ function module_list($refresh = FALSE, $bootstrap = FALSE, $sort = FALSE, $fixed ...@@ -65,9 +65,11 @@ function module_list($refresh = FALSE, $bootstrap = FALSE, $sort = FALSE, $fixed
} }
} }
else { else {
// As this is the $refresh case, make sure that system_list() returns if ($refresh) {
// fresh data. // For the $refresh case, make sure that system_list() returns fresh
system_list_reset(); // data.
drupal_static_reset('system_list');
}
if ($bootstrap) { if ($bootstrap) {
$list = system_list('bootstrap'); $list = system_list('bootstrap');
} }
...@@ -391,6 +393,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { ...@@ -391,6 +393,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) {
->condition('name', $module) ->condition('name', $module)
->execute(); ->execute();
// Refresh the module list to include it. // Refresh the module list to include it.
system_list_reset();
module_list(TRUE); module_list(TRUE);
module_implements('', FALSE, TRUE); module_implements('', FALSE, TRUE);
_system_update_bootstrap_status(); _system_update_bootstrap_status();
...@@ -508,6 +511,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { ...@@ -508,6 +511,7 @@ function module_disable($module_list, $disable_dependents = TRUE) {
if (!empty($invoke_modules)) { if (!empty($invoke_modules)) {
// Refresh the module list to exclude the disabled modules. // Refresh the module list to exclude the disabled modules.
system_list_reset();
module_list(TRUE); module_list(TRUE);
module_implements('', FALSE, TRUE); module_implements('', FALSE, TRUE);
// Invoke hook_modules_disabled before disabling modules, // Invoke hook_modules_disabled before disabling modules,
......
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