mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-04-08 18:55:09 +02:00
Fixed problems with acl enterprise in menu. Tiquet: #3001
(cherry picked from commit 67edcde80b58ee8d4e34545483bcaabb6c183c8b)
This commit is contained in:
parent
93c9c0c84e
commit
4fe734b783
@ -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;
|
||||
}
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user