diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-10-09 19:24:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-10-09 19:24:09 +0000 |
commit | 0f44d7d6cdfafe3a7bf59cb496b1aab6a637aa4a (patch) | |
tree | 9300184f759d48aa182279c53f5052ad1c6262f4 | |
parent | b11d99fe168aeabfc34bd4f8d0e55c0d82f08e48 (diff) | |
download | brdo-0f44d7d6cdfafe3a7bf59cb496b1aab6a637aa4a.tar.gz brdo-0f44d7d6cdfafe3a7bf59cb496b1aab6a637aa4a.tar.bz2 |
- Committed part 3 of Michael's help system improvements: removed the $help
parameter from the menu() function.
-rw-r--r-- | includes/menu.inc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index be4b052f2..ca2088fef 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -4,11 +4,11 @@ /** * Register a menu item with the menu system. */ -function menu($path, $title, $callback = NULL, $help = NULL, $weight = 0, $hidden = 0) { +function menu($path, $title, $callback = NULL, $weight = 0, $hidden = 0) { global $_list; // add the menu to the flat list of menu items: - $_list[$path] = array("title" => $title, "callback" => $callback, "help" => $help, "weight" => $weight, "hidden" => $hidden); + $_list[$path] = array("title" => $title, "callback" => $callback, "weight" => $weight, "hidden" => $hidden); } /** @@ -63,11 +63,16 @@ function menu_get_active_title() { * Returns the help associated with the active menu item. */ function menu_get_active_help() { - global $_list; + $path = $_GET["q"]; + $output = ""; - if ($path = menu_get_active_item()) { - return $_list[$path]["help"]; + $return = module_invoke_all("help", $path); + foreach ($return as $item) { + if (!empty($item)) { + $output .= $item ."\n"; + } } + return $output; } /** |