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

This commit is contained in:
Daniel Maya 2016-06-22 09:50:43 +02:00
parent 11e490a6c4
commit c24b118398
1 changed files with 1 additions and 1 deletions

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'