diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-06-24 21:40:06 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-06-24 21:40:06 +0000 |
commit | 0a5d9dd354c659a3e5992c0acacebe300a4d3654 (patch) | |
tree | e471626a50a9e5a8b33c74cd88b494dce9091931 | |
parent | e34b8526713f407e25e5b3fc51f1c0ca0f01c6a3 (diff) | |
download | brdo-0a5d9dd354c659a3e5992c0acacebe300a4d3654.tar.gz brdo-0a5d9dd354c659a3e5992c0acacebe300a4d3654.tar.bz2 |
- Patch #836630 by catch: module_implements() caching is broken.
-rw-r--r-- | includes/module.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/module.inc b/includes/module.inc index f96ba3b91..e6a8ff98a 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -586,6 +586,9 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE) { } if (!isset($implementations[$hook])) { + // The hook is not cached, so ensure that whether or not it has + // implementations, that the cache is updated at the end of the request. + $implementations['#write_cache'] = TRUE; $hook_info = module_hook_info(); $implementations[$hook] = array(); $list = module_list(FALSE, FALSE, $sort); @@ -593,8 +596,6 @@ function module_implements($hook, $sort = FALSE, $reset = FALSE) { $include_file = isset($hook_info[$hook]['group']) && module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']); if (module_hook($module, $hook)) { $implementations[$hook][$module] = $include_file ? $hook_info[$hook]['group'] : FALSE; - // We added something to the cache, so write it when we are done. - $implementations['#write_cache'] = TRUE; } } // Allow modules to change the weight of specific implementations but avoid |