summaryrefslogtreecommitdiff
path: root/includes/controller/event_config_controller.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-01-14 17:47:26 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2018-01-14 17:47:26 +0100
commitfe58e4f4220d6685b91bf516374e33936e1075e3 (patch)
tree6d2e3416a8148ef8070931c7a8bc1a50b7637bb2 /includes/controller/event_config_controller.php
parent0e8cc2f0a73085170df45c6a40e8f3df06a6af51 (diff)
database: updated checks for selectOne
Diffstat (limited to 'includes/controller/event_config_controller.php')
-rw-r--r--includes/controller/event_config_controller.php10
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..a18b6f42 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.'));
}