From 067b5a1d8be2b09510c6e93d0d7efe197b08d79d Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Wed, 20 Feb 2013 12:07:00 +0000 Subject: [PATCH] 2013-02-20 Miguel de Dios * godmode/servers/recon_script.php, godmode/servers/plugin.php, godmode/snmpconsole/snmp_filters.php, godmode/massive/massive_delete_alerts.php, godmode/massive/massive_enable_disable_alerts.php, godmode/massive/massive_edit_agents.php, godmode/massive/massive_delete_modules.php, godmode/massive/massive_add_action_alerts.php, godmode/massive/massive_delete_action_alerts.php: improved the code style. * include/ajax/events.php, include/functions_events.php, operation/agentes/custom_fields.php: fixed the show admin custom fields for user without permisitions. Fixes: #3605278 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7683 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 18 ++++ .../massive/massive_add_action_alerts.php | 10 +-- .../massive/massive_delete_action_alerts.php | 90 ++++++++++--------- .../godmode/massive/massive_delete_alerts.php | 2 +- .../massive/massive_delete_modules.php | 14 +-- .../godmode/massive/massive_edit_agents.php | 19 ++-- .../massive/massive_enable_disable_alerts.php | 2 +- pandora_console/godmode/servers/plugin.php | 25 +++--- .../godmode/servers/recon_script.php | 6 +- .../godmode/snmpconsole/snmp_filters.php | 6 +- pandora_console/include/ajax/events.php | 80 ++++++++--------- pandora_console/include/functions_events.php | 15 +++- .../operation/agentes/custom_fields.php | 40 ++++++--- 13 files changed, 191 insertions(+), 136 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 676565a903..2478d72cff 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,21 @@ +2013-02-20 Miguel de Dios + + * godmode/servers/recon_script.php, godmode/servers/plugin.php, + godmode/snmpconsole/snmp_filters.php, + godmode/massive/massive_delete_alerts.php, + godmode/massive/massive_enable_disable_alerts.php, + godmode/massive/massive_edit_agents.php, + godmode/massive/massive_delete_modules.php, + godmode/massive/massive_add_action_alerts.php, + godmode/massive/massive_delete_action_alerts.php: improved the code + style. + + * include/ajax/events.php, include/functions_events.php, + operation/agentes/custom_fields.php: fixed the show admin custom + fields for user without permisitions. + + Fixes: #3605278 + 2013-02-19 Ramon Novoa * include/auth/ldap.php: Do not bind anonymously to check whether the diff --git a/pandora_console/godmode/massive/massive_add_action_alerts.php b/pandora_console/godmode/massive/massive_add_action_alerts.php index 0aef89c103..4c464460ba 100644 --- a/pandora_console/godmode/massive/massive_add_action_alerts.php +++ b/pandora_console/godmode/massive/massive_add_action_alerts.php @@ -29,14 +29,14 @@ require_once ('include/functions_users.php'); if (is_ajax ()) { $get_alerts = (bool) get_parameter ('get_alerts'); - + if ($get_alerts) { $id_agents = get_parameter ('id_agents'); if (empty($id_agents)) { echo json_encode (''); return; } - + if(is_array($id_agents) && count($id_agents) == 1 && $id_agents[0] == '') { $id_agents = false; } @@ -105,7 +105,7 @@ if ($add) { ui_print_result_message (false, '', __('Could not be added').". ".__('No action selected')); } } - + } $groups = users_get_groups (); @@ -148,7 +148,7 @@ $table->data[2][1] = html_print_select (array(), 'id_alert_templates[]', '', '', $actions = alerts_get_alert_actions (); $table->data[3][0] = __('Action'); -$table->data[3][1] = html_print_select ($actions, 'action[]', '', '', '', '', true, true); +$table->data[3][1] = html_print_select ($actions, 'action[]', '', '', '', '', true, true); $table->data[3][1] .= ''.__('Advanced options').' » '; $table->data[3][1] .= '