diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a2607e812a..1237b56fa6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2009-09-17 Miguel de Dios + + * pandora_console/include/functions_events.php: fix the insert event, + before Pandora console inserted timestamp as string timestamp, now Pandora + console insert the event with clean and numeric unix timestamp. + * pandora_console/include/functions_alerts.php: cleanup the sourcecode. + Fixes: 2854087 + 2009-09-16 Miguel de Dios * operation/agentes/estado_agente.php, godmode/alerts/alert_list.php: fix diff --git a/pandora_console/include/functions_alerts.php b/pandora_console/include/functions_alerts.php index cf9fde6c04..c62997eea6 100644 --- a/pandora_console/include/functions_alerts.php +++ b/pandora_console/include/functions_alerts.php @@ -554,7 +554,8 @@ function validate_alert_agent_module ($id_alert_agent_module) { $group_id, $agent_id, 1, $config["id_user"], "alert_manual_validation", 1, $alert["id_agent_module"], $id); - } elseif ($result === false) { + } + elseif ($result === false) { return false; } } diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 2150f1b12d..538bc61064 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -236,7 +236,7 @@ function create_event ($event, $id_group, $id_agent, $status = 0, $id_user = "", $sql = sprintf ('INSERT INTO tevento (id_agente, id_grupo, evento, timestamp, estado, utimestamp, id_usuario, event_type, criticity, id_agentmodule, id_alert_am) - VALUES (%d, %d, "%s", NOW(), %d, NOW(), "%s", "%s", %d, %d, %d)', + VALUES (%d, %d, "%s", NOW(), %d, UNIX_TIMESTAMP(NOW()), "%s", "%s", %d, %d, %d)', $id_agent, $id_group, $event, $status, $id_user, $event_type, $priority, $id_agent_module, $id_aam);