summaryrefslogtreecommitdiff
path: root/includes/model/EventConfig_model.php
diff options
context:
space:
mode:
authorBot <bot@myigel.name>2017-01-02 03:57:23 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 03:57:23 +0100
commit7313e15ce8236e19331fb6639a3a5b97c8f06ecd (patch)
tree399e5eaa403d6dd5993ca8fb6f2162319d2ed2e1 /includes/model/EventConfig_model.php
parentb839e401062b294292fdcbd7e30b79bc149fab6f (diff)
PSR-2 formatting
Diffstat (limited to 'includes/model/EventConfig_model.php')
-rw-r--r--includes/model/EventConfig_model.php45
1 files changed, 23 insertions, 22 deletions
diff --git a/includes/model/EventConfig_model.php b/includes/model/EventConfig_model.php
index de5073d0..b4fdb728 100644
--- a/includes/model/EventConfig_model.php
+++ b/includes/model/EventConfig_model.php
@@ -3,39 +3,41 @@
/**
* Get event config.
*/
-function EventConfig() {
- $event_config = sql_select("SELECT * FROM `EventConfig` LIMIT 1");
- if ($event_config === false) {
- engelsystem_error("Unable to load event config.");
- return false;
- }
- if (count($event_config) > 0) {
- return $event_config[0];
- }
- return null;
+function EventConfig()
+{
+ $event_config = sql_select("SELECT * FROM `EventConfig` LIMIT 1");
+ if ($event_config === false) {
+ engelsystem_error("Unable to load event config.");
+ return false;
+ }
+ if (count($event_config) > 0) {
+ return $event_config[0];
+ }
+ return null;
}
/**
* Update event config.
*
- * @param string $event_name
- * @param int $buildup_start_date
- * @param int $event_start_date
- * @param int $event_end_date
- * @param int $teardown_end_date
- * @param string $event_welcome_msg
+ * @param string $event_name
+ * @param int $buildup_start_date
+ * @param int $event_start_date
+ * @param int $event_end_date
+ * @param int $teardown_end_date
+ * @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 (EventConfig() == null) {
- return sql_query("INSERT INTO `EventConfig` SET
+function EventConfig_update($event_name, $buildup_start_date, $event_start_date, $event_end_date, $teardown_end_date, $event_welcome_msg)
+{
+ if (EventConfig() == null) {
+ return sql_query("INSERT INTO `EventConfig` SET
`event_name`=" . sql_null($event_name) . ",
`buildup_start_date`=" . sql_null($buildup_start_date) . ",
`event_start_date`=" . sql_null($event_start_date) . ",
`event_end_date`=" . sql_null($event_end_date) . ",
`teardown_end_date`=" . sql_null($teardown_end_date) . ",
`event_welcome_msg`=" . sql_null($event_welcome_msg));
- }
- return sql_query("UPDATE `EventConfig` SET
+ }
+ return sql_query("UPDATE `EventConfig` SET
`event_name`=" . sql_null($event_name) . ",
`buildup_start_date`=" . sql_null($buildup_start_date) . ",
`event_start_date`=" . sql_null($event_start_date) . ",
@@ -43,4 +45,3 @@ function EventConfig_update($event_name, $buildup_start_date, $event_start_date,
`teardown_end_date`=" . sql_null($teardown_end_date) . ",
`event_welcome_msg`=" . sql_null($event_welcome_msg));
}
-?>