diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-12-18 21:13:17 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-12-18 21:13:17 +0000 |
commit | 23c7a4aa5da9fdd9181d3ce19b2b7bd005d943c7 (patch) | |
tree | ad2bae3d6b8ebc3b57f44bebe8d96b5b67eda7dd | |
parent | 7bbf844073bebf66938129865b4acbb7b5c0c1aa (diff) | |
download | brdo-23c7a4aa5da9fdd9181d3ce19b2b7bd005d943c7.tar.gz brdo-23c7a4aa5da9fdd9181d3ce19b2b7bd005d943c7.tar.bz2 |
- Fixed bug 4703: don't display the help text when the user has no access
rights for a page. That is, only return the help text if an active
handler exists.
-rw-r--r-- | includes/menu.inc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index c2d932b64..9ce6cde32 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -100,16 +100,19 @@ function menu_get_active_title() { * Returns the help associated with the active menu item. */ function menu_get_active_help() { - $path = $_GET["q"]; - $output = ""; - $return = module_invoke_all("help", $path); - foreach ($return as $item) { - if (!empty($item)) { - $output .= $item ."\n"; + if (menu_active_handler_exists()) { + $path = $_GET["q"]; + $output = ""; + + $return = module_invoke_all("help", $path); + foreach ($return as $item) { + if (!empty($item)) { + $output .= $item ."\n"; + } } + return $output; } - return $output; } /** |