summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-27 17:59:28 +0200
committermsquare <msquare@notrademark.de>2016-09-27 17:59:28 +0200
commit5957e05bf13ec9659f52a3c613abac09cacab8c6 (patch)
tree4c926f5f2497c5955ad03594b0ee907652c1a51e /includes/model
parent031fc3057c46245cd62fc39f2d11ee3f0a393e06 (diff)
finished rename settings to event config and added more date validation for event config
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/EventConfig_model.php14
1 files changed, 7 insertions, 7 deletions
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 @@
<?php
/**
- * Get settings.
+ * Get event config.
*/
function EventConfig() {
- $settings = sql_select("SELECT * FROM `EventConfig` LIMIT 1");
- if ($settings === false)
+ $event_config = sql_select("SELECT * FROM `EventConfig` LIMIT 1");
+ if ($event_config === false)
return false;
- if (count($settings) > 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) . ",