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) {