From 8057517acda4dd4c6090ebc52ea43a1e770eb7d2 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 15 Sep 2014 18:52:29 +0200 Subject: [PATCH] Fixed the date filter of the list --- pandora_console/godmode/agentes/planned_downtime.list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.list.php b/pandora_console/godmode/agentes/planned_downtime.list.php index c9dc4eb5cc..675efc44a6 100755 --- a/pandora_console/godmode/agentes/planned_downtime.list.php +++ b/pandora_console/godmode/agentes/planned_downtime.list.php @@ -311,7 +311,10 @@ if(!empty($groups)) { } if (!empty($date_to)) { - $periodically_monthly_w = "type_periodicity = 'monthly' AND (periodically_day_from <= '".date('d', strtotime($date_from))."' AND periodically_time_to >= '".date('d', strtotime($date_to))."')"; + $periodically_monthly_w = "type_periodicity = 'monthly' + AND ((periodically_day_from <= '".date('d', strtotime($date_from))."' AND periodically_day_to >= '".date('d', strtotime($date_to))."') + OR (periodically_day_from > periodically_day_to + AND (periodically_day_from <= '".date('d', strtotime($date_from))."' OR periodically_day_to >= '".date('d', strtotime($date_to))."')))"; $periodically_weekly_days = array(); $date_from_aux = strtotime($date_from);