From d9df010901cbba0fe0acf154de53dcc201de8497 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Wed, 14 Apr 2010 09:21:33 +0000 Subject: [PATCH] 2010-04-14 Sergio Martin * godmode/alerts/alert_list.php: Controled the sucessful of the create an alarm to audit it for bug 2987006 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2561 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/alerts/alert_list.php | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 382792cacb..6dcfa6d37d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-04-14 Sergio Martin + + * godmode/alerts/alert_list.php: Controled the sucessful of the + create an alarm to audit it for bug 2987006 + 2010-04-14 Sergio Martin * godmode/alerts/alert_list.php, diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index cddedbb47b..2a37f67e3f 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -74,9 +74,12 @@ if ($create_alert) { $alert_template_name = get_db_value ("name", "talert_templates","id", $id_alert_template); $module_name = get_db_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); $agent_name = get_agent_name (get_db_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); - - audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "Alert management", + + // Audit the creation only when the alert creation is correct + if($id) { + audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "Alert management", "Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'"); + } $messageAction = print_result_message ($id, __('Successfully created'), __('Could not be created'), '', true); if ($id !== false) {