2012-04-10 Dario Rodriguez <dario.rodriguez@artica.es>

*operation/menu.php,
	godmode/menu.php: Fixed a bug showing extensions with new menu structure.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5927 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2012-04-10 15:35:13 +00:00
parent 8fb04851c4
commit 99e36dbe34
3 changed files with 51 additions and 53 deletions

View File

@ -1,3 +1,8 @@
2012-04-10 Dario Rodriguez <dario.rodriguez@artica.es>
*operation/menu.php,
godmode/menu.php: Fixed a bug showing extensions with new menu structure.
2012-04-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/ajax/reporting.ajax.php

View File

@ -249,35 +249,37 @@ if (check_acl ($config['id_user'], 0, "PM")) {
continue;
}
//Check if was displayed inside other menu
//Check the ACL for this user
$extmenu = $extension['godmode_menu'];
if ($extension['godmode_menu']["fatherId"] != ''
|| ! check_acl ($config['id_user'], 0, $extmenu['acl'])
|| $extension["godmode_menu"]["sec2"] == "") {
//Check the ACL for this user
if (! check_acl ($config['id_user'], 0, $extmenu['acl'])) {
continue;
}
$sub[$extmenu["sec2"]]["text"] = $extmenu["name"];
$sub[$extmenu["sec2"]]["refr"] = 0;
//Check if was displayed inside other menu
if ($extension['godmode_menu']["fatherId"] == '') {
$sub[$extmenu["sec2"]]["text"] = $extmenu["name"];
$sub[$extmenu["sec2"]]["refr"] = 0;
} else {
if (array_key_exists('fatherId',$extmenu)) {
if (strlen($extmenu['fatherId']) > 0) {
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
if ($extmenu["name"] != 'DB interface'){
if (!empty($config['refr'])){
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr'];
}
else{
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 60;
if (array_key_exists('fatherId',$extmenu)) {
if (strlen($extmenu['fatherId']) > 0) {
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["text"] = __($extmenu['name']);
if ($extmenu["name"] != 'DB interface'){
if (!empty($config['refr'])){
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = $config['refr'];
}
else{
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["refr"] = 60;
}
}
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon'];
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions';
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true;
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise'];
$menu[$extmenu['fatherId']]['hasExtensions'] = true;
}
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["icon"] = $extmenu['icon'];
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["sec"] = 'gextensions';
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["extension"] = true;
$menu[$extmenu['fatherId']]['sub'][$extmenu['sec2']]["enterprise"] = $extension['enterprise'];
$menu[$extmenu['fatherId']]['hasExtensions'] = true;
}
}
}

View File

@ -363,38 +363,29 @@ if (check_acl ($config['id_user'], 0, "AR")) {
continue;
}
//Check if was displayed inside other menu
if ($extension["operation_menu"]["fatherId"] != '' || $extension["operation_menu"]["sec2"] == "") {
continue;
}
$extension_menu = $extension["operation_menu"];
$sub[$extension_menu["sec2"]]["text"] = $extension_menu["name"];
$sub[$extension_menu["sec2"]]["refr"] = 0;
//Check if was displayed inside other menu
if ($extension["operation_menu"]["fatherId"] == '') {
$sub[$extension_menu["sec2"]]["text"] = $extension_menu["name"];
$sub[$extension_menu["sec2"]]["refr"] = 0;
} else {
if (array_key_exists('fatherId',$extension_menu)) {
if (strlen($extension_menu['fatherId']) > 0) {
$menu[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["text"] = __($extension_menu['name']);
$menu[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["refr"] = 0;
$menu[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["icon"] = $extension_menu['icon'];
$menu[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["sec"] = 'extensions';
$menu[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["extension"] = true;
$menu[$extension_menu['fatherId']]['sub'][$extension_menu['sec2']]["enterprise"] = $extension['enterprise'];
$menu[$extension_menu['fatherId']]['hasExtensions'] = true;
}
}
}
}
$menu["extensions"]["sub"] = $sub;
/**
* Add the extensions
*/
foreach($config['extensions'] as $extension) {
$operationModeMenu = $extension['operation_menu'];
if ($operationModeMenu == null)
continue;
if (array_key_exists('fatherId',$operationModeMenu)) {
if (strlen($operationModeMenu['fatherId']) > 0) {
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["text"] = __($operationModeMenu['name']);
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["refr"] = 0;
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["icon"] = $operationModeMenu['icon'];
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["sec"] = 'extensions';
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["extension"] = true;
$menu[$operationModeMenu['fatherId']]['sub'][$operationModeMenu['sec2']]["enterprise"] = $extension['enterprise'];
$menu[$operationModeMenu['fatherId']]['hasExtensions'] = true;
}
}
}
}
}