diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3aaea1f269..c5f176ddca 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2011-07-20 Sergio Martin + + * include/functions_menu.php: Fixed side menu confitions + to draw in bold style the selected subsections to allow + secondary parameters like "&tab=agents" in the subsections + 2011-07-20 Sergio Martin * godmode/menu.php: Added users massive operation to the diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index fa072b0a7e..18048a5133 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -33,6 +33,9 @@ function menu_print_menu (&$menu) { $sec = (string) get_parameter ('sec'); $sec2 = (string) get_parameter ('sec2'); + $allsec2 = explode('sec2=', $_SERVER['REQUEST_URI']); + $allsec2 = $allsec2[1]; + echo ''; foreach ($menu as $mainsec => $main) { @@ -81,27 +84,25 @@ function menu_print_menu (&$menu) { $submenu_output = ''; $selected = false; $visible = false; - foreach ($main["sub"] as $subsec2 => $sub) { - + $subsec2 = io_safe_output($subsec2); // Choose valid suboptions (sec2) if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2)) == false){ continue; } - //Set class - if (($sec2 == $subsec2 && isset ($sub[$subsec2]["options"])) + if (($sec2 == $subsec2 || $allsec2 == $subsec2) && isset ($sub[$subsec2]["options"]) && (get_parameter_get ($sub[$subsec2]["options"]["name"]) == $sub[$subsec2]["options"]["value"])) { //If the subclass is selected and there are options and that options value is true $class = 'submenu_selected'; $selected = true; $visible = true; } - elseif ($sec2 == $subsec2 && !isset ($sub[$subsec2]["options"])) { + elseif (($sec2 == $subsec2 || $allsec2 == $subsec2) && !isset ($sub[$subsec2]["options"])) { $class = 'submenu_selected'; $selected = true; - + $hasExtensions = (array_key_exists('hasExtensions',$main)) ? $main['hasExtensions'] : false; if (($extensionInMenuParameter != '') && ($hasExtensions)) $visible = true; @@ -112,7 +113,7 @@ function menu_print_menu (&$menu) { //Else it's not selected $class = 'submenu_not_selected'; } - + if (! isset ($sub["refr"])) { $sub["refr"] = 0; }