diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-02 23:40:58 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-02 23:40:58 +0000 |
commit | 5d7a73564305989fd61700d0d3f4d7b55f6b26f5 (patch) | |
tree | a3a3d7e7d081572ca0094dcc8705c21c1e53a755 | |
parent | 99ccb2e572e5cbf3028cb0499901b6845b16a83a (diff) | |
download | brdo-5d7a73564305989fd61700d0d3f4d7b55f6b26f5.tar.gz brdo-5d7a73564305989fd61700d0d3f4d7b55f6b26f5.tar.bz2 |
- Patch #929178 by carlos8f, chx: module_list() kills system_list() caching.
-rw-r--r-- | includes/module.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/includes/module.inc b/includes/module.inc index 82319054e..e0980bb14 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -65,9 +65,11 @@ function module_list($refresh = FALSE, $bootstrap = FALSE, $sort = FALSE, $fixed } } else { - // As this is the $refresh case, make sure that system_list() returns - // fresh data. - system_list_reset(); + if ($refresh) { + // For the $refresh case, make sure that system_list() returns fresh + // data. + drupal_static_reset('system_list'); + } if ($bootstrap) { $list = system_list('bootstrap'); } @@ -391,6 +393,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { ->condition('name', $module) ->execute(); // Refresh the module list to include it. + system_list_reset(); module_list(TRUE); module_implements('', FALSE, TRUE); _system_update_bootstrap_status(); @@ -508,6 +511,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { if (!empty($invoke_modules)) { // Refresh the module list to exclude the disabled modules. + system_list_reset(); module_list(TRUE); module_implements('', FALSE, TRUE); // Invoke hook_modules_disabled before disabling modules, |