diff options
author | msquare <msquare@notrademark.de> | 2018-09-02 16:55:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-02 16:55:35 +0200 |
commit | a103bc06e28f5eca6ba9c28c81ae1227d689f224 (patch) | |
tree | 759d675b621eed86b20f14abe448e83fa8d22562 /includes/controller/event_config_controller.php | |
parent | bd8ceda6830f97247b73932b85ce41af5b8d2ab0 (diff) | |
parent | 2bebbeb1919e1d370ac5c0668e0db5ea63e73292 (diff) |
Merge pull request #452 from MyIgel/rebuild-database
Rebuild database
Diffstat (limited to 'includes/controller/event_config_controller.php')
-rw-r--r-- | includes/controller/event_config_controller.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/includes/controller/event_config_controller.php b/includes/controller/event_config_controller.php index 4422f046..e64f47fd 100644 --- a/includes/controller/event_config_controller.php +++ b/includes/controller/event_config_controller.php @@ -28,7 +28,7 @@ function event_config_edit_controller() $teardown_end_date = null; $event_config = EventConfig(); - if ($event_config != null) { + if (!empty($event_config)) { $event_name = $event_config['event_name']; $buildup_start_date = $event_config['buildup_start_date']; $event_start_date = $event_config['event_start_date']; @@ -70,22 +70,22 @@ function event_config_edit_controller() $teardown_end_date = $result->getValue(); $valid &= $result->isValid(); - if ($buildup_start_date != null && $event_start_date != null && $buildup_start_date > $event_start_date) { + if (!is_null($buildup_start_date) && !is_null($event_start_date) && $buildup_start_date > $event_start_date) { $valid = false; error(_('The buildup start date has to be before the event start date.')); } - if ($event_start_date != null && $event_end_date != null && $event_start_date > $event_end_date) { + if (!is_null($event_start_date) && !is_null($event_end_date) && $event_start_date > $event_end_date) { $valid = false; error(_('The event start date has to be before the event end date.')); } - if ($event_end_date != null && $teardown_end_date != null && $event_end_date > $teardown_end_date) { + if (!is_null($event_end_date) && !is_null($teardown_end_date) && $event_end_date > $teardown_end_date) { $valid = false; error(_('The event end date has to be before the teardown end date.')); } - if ($buildup_start_date != null && $teardown_end_date != null && $buildup_start_date > $teardown_end_date) { + if (!is_null($buildup_start_date) && !is_null($teardown_end_date) && $buildup_start_date > $teardown_end_date) { $valid = false; error(_('The buildup start date has to be before the teardown end date.')); } |