=== modified file 'includes/module.inc' --- includes/module.inc 2006-11-16 08:28:07 +0000 +++ includes/module.inc 2006-11-17 05:35:13 +0000 @@ -319,6 +319,9 @@ function module_hook($module, $hook) { * @param $sort * By default, modules are ordered by weight and filename, settings this option * to TRUE, module list will be ordered by module name. + * @param $reset + * If set to TRUE, the list of modules will be updated and so will include + * modules which have just been turned on. * @return * An array with the names of the modules which are implementing this hook. */ @@ -327,7 +330,12 @@ function module_implements($hook, $sort if (!isset($implementations[$hook])) { $implementations[$hook] = array(); - $list = module_list(FALSE, TRUE, $sort); + if ($reset) { + $list = module_list(TRUE, TRUE, $sort); + } + else { + $list = module_list(FALSE, TRUE, $sort); + } foreach ($list as $module) { if (module_hook($module, $hook)) { $implementations[$hook][] = $module;