From e91c83217279478d864fe8cfe94140ed58d0af86 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 9 Oct 2014 13:50:05 +0200 Subject: [PATCH] Fixed the unset variables that show PHP warnings and break the RSS events --- .../operation/events/events.build_query.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora_console/operation/events/events.build_query.php b/pandora_console/operation/events/events.build_query.php index 81c8b2fee7..b0e814369d 100755 --- a/pandora_console/operation/events/events.build_query.php +++ b/pandora_console/operation/events/events.build_query.php @@ -162,20 +162,27 @@ else { if ($id_user_ack != "0") $sql_post .= " AND id_usuario = '" . $id_user_ack . "'"; +if (!isset($date_from)) { + $date_from = ""; +} +if (!isset($date_to)) { + $date_to = ""; +} if (($date_from == '') && ($date_to == '')) { if ($event_view_hr > 0) { $unixtime = get_system_time () - ($event_view_hr * SECONDS_1HOUR); $sql_post .= " AND (utimestamp > " . $unixtime . ")"; } -} else { +} +else { if ($date_from != '') { - $udate_from = strtotime($date_from." 00:00:00"); + $udate_from = strtotime($date_from . " 00:00:00"); $sql_post .= " AND (utimestamp >= " . $udate_from . ")"; } if ($date_to != '') { - $udate_to = strtotime($date_to." 23:59:59"); + $udate_to = strtotime($date_to . " 23:59:59"); $sql_post .= " AND (utimestamp <= " . $udate_to . ")"; } }