From 8608d4ad035723aae121ebc91d329f2ef6a11067 Mon Sep 17 00:00:00 2001 From: darode Date: Tue, 3 Apr 2012 13:26:22 +0000 Subject: [PATCH] 2012-04-03 Dario Rodriguez * include/functions_menu.php: Deleted extension icon on menus. * extensions/extension_uploader.php: Fixed wrong link to menu for this extension. * operation/menu.php, godmode/menu.php: Fixed duplicated extension links on menus. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5883 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 10 ++++++++++ pandora_console/extensions/extension_uploader.php | 2 +- pandora_console/godmode/menu.php | 15 ++++++++++++--- pandora_console/include/functions_menu.php | 4 ++-- pandora_console/operation/menu.php | 7 +++++++ 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 52d489be5a..d57e07c894 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2012-04-03 Dario Rodriguez + + * include/functions_menu.php: Deleted extension icon on menus. + + * extensions/extension_uploader.php: Fixed wrong link to menu for this + extension. + + * operation/menu.php, + godmode/menu.php: Fixed duplicated extension links on menus. + 2012-04-03 Vanessa Gil * pandoradb.sql diff --git a/pandora_console/extensions/extension_uploader.php b/pandora_console/extensions/extension_uploader.php index 3978d2e1aa..e934a6df83 100644 --- a/pandora_console/extensions/extension_uploader.php +++ b/pandora_console/extensions/extension_uploader.php @@ -75,6 +75,6 @@ function extension_uploader_extensions() { echo ""; } -extensions_add_godmode_menu_option(__('Extension uploader'), 'AM', 'gextensions'); +extensions_add_godmode_menu_option(__('Extension uploader'), 'AM'); extensions_add_godmode_function('extension_uploader_extensions'); ?> diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index f6cfd7fab2..634cb63bed 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -245,11 +245,20 @@ if (check_acl ($config['id_user'], 0, "PM")) { $sub = array (); foreach ($config['extensions'] as $extension) { - $extmenu = $extension['godmode_menu']; - if ($extension['godmode_menu'] == '' || ! check_acl ($config['id_user'], 0, $extmenu['acl'])) { + //If no godmode_menu is a operation extension + if ($extension['godmode_menu'] == '') { 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"] == "") { + continue; + } + $sub[$extmenu["sec2"]]["text"] = $extmenu["name"]; $sub[$extmenu["sec2"]]["refr"] = 0; diff --git a/pandora_console/include/functions_menu.php b/pandora_console/include/functions_menu.php index ca7108a4ae..d3c4eb96be 100644 --- a/pandora_console/include/functions_menu.php +++ b/pandora_console/include/functions_menu.php @@ -218,8 +218,8 @@ function menu_print_menu (&$menu) { else { $imageIcon = $imageIconDefault; } - - $submenu_output .= '
 
'; + //Delete extension Icon before the was a style with background: url('.$imageIcon.') no-repeat; + $submenu_output .= '
 
'; } diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 88b8fa1706..ab0439a457 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -344,9 +344,16 @@ if (check_acl ($config['id_user'], 0, "AR")) { $sub["operation/agentes/exportdata"]["refr"] = 0; foreach ($config["extensions"] as $extension) { + //If no operation_menu is a godmode extension if ($extension["operation_menu"] == '') { 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;