From 4fe734b783a15cd95535a14445518b70650a1ff2 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Thu, 3 Dec 2015 13:11:35 +0100 Subject: [PATCH] Fixed problems with acl enterprise in menu. Tiquet: #3001 (cherry picked from commit 67edcde80b58ee8d4e34545483bcaabb6c183c8b) --- pandora_console/include/functions_menu.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index 34f521e521..d3a4aee622 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -309,7 +309,7 @@ function menu_print_menu (&$menu) { $count_sub2 = 0; foreach ($sub['sub2'] as $key => $sub2) { - if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2, true,$key)) == false) { + if (enterprise_hook ('enterprise_acl', array ($config['id_user'], $mainsec, $subsec2, false,$key)) == false) { continue; } @@ -671,4 +671,18 @@ function menu_sec2_in_sec($sec,$sec2) { return false; } + +function menu_sec3_in_sec2($sec,$sec2,$sec3) { + $sec3_array = menu_get_sec2_pages($sec, $sec2, $menu_hash = false); + + // If this value has various parameters, we only get the first + $sec3 = explode('&',$sec3); + $sec3 = $sec3[0]; + + if ($sec3_array != null && in_array($sec3,array_keys($sec3_array))) { + return true; + } + + return false; +} ?>