Fixed allow create planned downtimes in the past. Ticket #3454.

(cherry picked from commit c24b118398d2da6e72f42ac212719290e176a73b)
This commit is contained in:
Daniel Maya 2016-06-22 09:50:43 +02:00
parent a65d355cf0
commit c565fa42f6

View File

@ -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'