From 7f61dc95be4ac543986c7df2459532fd8f81368d Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Tue, 25 Sep 2018 17:33:31 +0200 Subject: EventConfig: Merge event configuration from database to global config --- includes/pages/guest_login.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'includes/pages/guest_login.php') diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index fbad8ff6..797aaea7 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -1,5 +1,6 @@ get('welcome_msg')) { + return User_registration_success_view($message); } redirect(page_link_to('/')); @@ -283,13 +284,14 @@ function guest_register() $buildup_start_date = time(); $teardown_end_date = null; - if (!empty($event_config)) { - if (isset($event_config['buildup_start_date'])) { - $buildup_start_date = $event_config['buildup_start_date']; - } - if (isset($event_config['teardown_end_date'])) { - $teardown_end_date = $event_config['teardown_end_date']; - } + if ($buildup = $config->get('buildup_start')) { + /** @var Carbon $buildup */ + $buildup_start_date = $buildup->getTimestamp(); + } + + if ($teardown = $config->get('teardown_end')) { + /** @var Carbon $teardown */ + $teardown_end_date = $teardown->getTimestamp(); } return page_with_title(register_title(), [ @@ -452,12 +454,10 @@ function guest_login() } } - $event_config = EventConfig(); - return page([ div('col-md-12', [ div('row', [ - EventConfig_countdown_page($event_config) + EventConfig_countdown_page() ]), div('row', [ div('col-sm-6 col-sm-offset-3 col-md-4 col-md-offset-4', [ -- cgit v1.2.3-54-g00ecf