From 65620ab7dd3839f5a00cebf5d12dcd0f4010e6da Mon Sep 17 00:00:00 2001 From: guruevi Date: Wed, 10 Dec 2008 20:15:47 +0000 Subject: [PATCH] 2008-12-10 Evi Vanoost * include/functions.php: format_for_graph is now much simpler and uses format_numeric. * include/functions_db.php: give_note_author, give_incident_author, dame_numero_notas, borrar_incidencia, event_insert and return_event_description are now in their respective functions_*.php files but under a new name. Fixed delete_agent transaction error detection * include/functions_events.php: Added get_event_description and create_event (formerly return_event_description and event_insert) * include/functions_html.php: print_timestamp attributes should be default empty, not required. Added print_username for a consistent username print * operation/agentes/ver_agente.php: Function renaming (create_event) * operation/incidents/incident.php: Partial rewrite. Uses new functions. Also added some of feature request #2264838 * operation/incidents/incident_detail.php: Partial rewrite. Uses new functions. Added some of feature request #2264838 functionality. * operation/incidents/incident_search.php, operation/incidents/incident_statistics.php: Minor style update * pandoradb.sql: New tincidencia and tnota layout. No use for tnota_inc * include/functions_incidents.php: All incidents functions. Documentation will be online soon. Also includes an upgrade mechanism for SVN users. Mechanism should be removed for a stable version and integrated into install/upgrade tool. * lib/PandoraFMS/DB.pm: New table layout doesn't require timestamp anymore git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1286 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 3 +++ pandora_server/lib/PandoraFMS/DB.pm | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index e0b1c26ae4..41cb39a452 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,4 +1,7 @@ +2008-12-10 Evi Vanoost + * lib/PandoraFMS/DB.pm: New table layout doesn't require timestamp anymore + 2008-12-03 Sancho Lerena * mysql_plugin.sh: Updated MySQL plugin. diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index 134741601c..90fdccd601 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -1536,8 +1536,7 @@ sub pandora_create_incident (%$$$$$$$) { my $status = $_[5]; my $origin = $_[6]; my $id_group = $_[7]; - my $my_timestamp = &UnixDate("today","%Y-%m-%d %H:%M:%S"); - my $sql = "INSERT INTO tincidencia (inicio, actualizacion, titulo, descripcion, origen, estado, prioridad, id_grupo) VALUES ('$my_timestamp', '$my_timestamp', '$title', '$text', '$origin', $status, $priority, $id_group)"; + my $sql = "INSERT INTO tincidencia (inicio, titulo, descripcion, origen, estado, prioridad, id_grupo) VALUES (NOW(), '$title', '$text', '$origin', $status, $priority, $id_group)"; $dbh->do($sql); }