From 6ad9386cf6773b5181daf0865bc04ec560d465bc Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 8 Oct 2019 15:42:55 +0200 Subject: [PATCH] Added date control --- pandora_console/include/functions_planned_downtimes.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora_console/include/functions_planned_downtimes.php b/pandora_console/include/functions_planned_downtimes.php index 1147ad97a8..a9b701241b 100644 --- a/pandora_console/include/functions_planned_downtimes.php +++ b/pandora_console/include/functions_planned_downtimes.php @@ -796,6 +796,11 @@ function planned_downtimes_created($values) 'return' => false, 'message' => __('Not created. Error inserting data').'. '.__('There is no group with such id'), ]; + } else if (!$values['date_from'] || !$values['date_to']) { + return [ + 'return' => false, + 'message' => __('Not created. Error inserting data').'. '.__('Date is wrong formatted'), + ]; } else { if (trim(io_safe_output($values['name'])) != '') { if (!$check) {