diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-11-15 11:45:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-11-15 11:45:04 +0000 |
commit | 97fdc491917f6f12d734cb13bf2101cfc12096fd (patch) | |
tree | 6705139d65bdbbfd0c7ccb7c59f9442bd6a5cd7d /includes | |
parent | 10104ba94ac7a70b2be3594cb769034582533e1f (diff) | |
download | brdo-97fdc491917f6f12d734cb13bf2101cfc12096fd.tar.gz brdo-97fdc491917f6f12d734cb13bf2101cfc12096fd.tar.bz2 |
- Patch #334030 by justinrandell: replace module_list with module_implements when calling a hook.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 2cd620770..bba9391ff 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -1220,17 +1220,16 @@ function menu_get_active_help() { $arg = drupal_help_arg(arg(NULL)); $empty_arg = drupal_help_arg(); - foreach (module_list() as $name) { - if (module_hook($name, 'help')) { - // Lookup help for this path. - if ($help = module_invoke($name, 'help', $router_path, $arg)) { - $output .= $help . "\n"; - } - // Add "more help" link on admin pages if the module provides a - // standalone help page. - if ($arg[0] == "admin" && module_exists('help') && module_invoke($name, 'help', 'admin/help#' . $arg[2], $empty_arg) && $help) { - $output .= theme("more_help_link", url('admin/help/' . $arg[2])); - } + foreach (module_implements('help') as $module) { + $function = $module . '_help'; + // Lookup help for this path. + if ($help = $function($router_path, $arg)) { + $output .= $help . "\n"; + } + // Add "more help" link on admin pages if the module provides a + // standalone help page. + if ($arg[0] == "admin" && module_exists('help') && $function('admin/help#' . $arg[2], $empty_arg) && $help) { + $output .= theme("more_help_link", url('admin/help/' . $arg[2])); } } return $output; |