From 23c7a4aa5da9fdd9181d3ce19b2b7bd005d943c7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 18 Dec 2003 21:13:17 +0000 Subject: - 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. --- includes/menu.inc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'includes') 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; } /** -- cgit v1.2.3