From 5957e05bf13ec9659f52a3c613abac09cacab8c6 Mon Sep 17 00:00:00 2001 From: msquare Date: Tue, 27 Sep 2016 17:59:28 +0200 Subject: finished rename settings to event config and added more date validation for event config --- includes/model/EventConfig_model.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'includes/model') diff --git a/includes/model/EventConfig_model.php b/includes/model/EventConfig_model.php index 57ba1d0f..0529c286 100644 --- a/includes/model/EventConfig_model.php +++ b/includes/model/EventConfig_model.php @@ -1,19 +1,19 @@ 0) - return $settings[0]; + if (count($event_config) > 0) + return $event_config[0]; return null; } /** - * Update Settings. + * Update event config. * * @param string $event_name * @param int $buildup_start_date @@ -23,7 +23,7 @@ function EventConfig() { * @param string $event_welcome_msg */ function EventConfig_update($event_name, $buildup_start_date, $event_start_date, $event_end_date, $teardown_end_date, $event_welcome_msg) { - if (Settings() == null) { + if (EventConfig() == null) { return sql_query("INSERT INTO `EventConfig` SET `event_name`=" . sql_null($event_name) . ", `buildup_start_date`=" . sql_null($buildup_start_date) . ", -- cgit v1.2.3-54-g00ecf