From c24b118398d2da6e72f42ac212719290e176a73b Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 22 Jun 2016 09:50:43 +0200 Subject: [PATCH] Fixed allow create planned downtimes in the past. Ticket #3454. --- pandora_console/godmode/agentes/planned_downtime.editor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora_console/godmode/agentes/planned_downtime.editor.php b/pandora_console/godmode/agentes/planned_downtime.editor.php index 0687548eb7..844c456887 100644 --- a/pandora_console/godmode/agentes/planned_downtime.editor.php +++ b/pandora_console/godmode/agentes/planned_downtime.editor.php @@ -208,7 +208,7 @@ if ($create_downtime || $update_downtime) { else if ($type_execution == 'once' && $datetime_from >= $datetime_to) { ui_print_error_message(__('Not created. Error inserting data') . ". " .__('The end date must be higher than the start date')); } - else if ($type_execution == 'once' && $datetime_to <= $now) { + else if ($type_execution == 'once' && $datetime_to <= $now && !$config["past_planned_downtimes"]) { ui_print_error_message(__('Not created. Error inserting data') . ". " .__('The end date must be higher than the current time')); } else if ($type_execution == 'periodically'