From 7d5d905fcf03a67f606154feee6173581640708f Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Thu, 20 Jul 2017 01:14:28 +0200 Subject: [PATCH] Moved $themes array to config --- config/config.default.php | 11 ++++++++++- includes/pages/user_settings.php | 3 ++- includes/sys_template.php | 11 ----------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/config/config.default.php b/config/config.default.php index e816fe9c..ffa030db 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -29,9 +29,18 @@ return [ // From address of all emails 'no_reply_email' => 'noreply@engelsystem.de', - // Default theme of the start page, 1=style1.css + // Default theme, 1=style1.css 'theme' => 1, + // Available themes + 'available_themes' => [ + '4' => 'Engelsystem 33c3 (2016)', + '3' => 'Engelsystem 32c3 (2015)', + '2' => 'Engelsystem cccamp15', + '0' => 'Engelsystem light', + '1' => 'Engelsystem dark' + ], + // Number of News shown on one site 'display_news' => 6, diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php index 69e5a7fb..667e73d9 100644 --- a/includes/pages/user_settings.php +++ b/includes/pages/user_settings.php @@ -198,8 +198,9 @@ function user_settings_locale($user_source, $locales) */ function user_settings() { - global $themes, $user; + global $user; $request = request(); + $themes = config('available_themes'); $enable_tshirt_size = config('enable_tshirt_size'); $tshirt_sizes = config('tshirt_sizes'); diff --git a/includes/sys_template.php b/includes/sys_template.php index 1d3943b7..bcf462d7 100644 --- a/includes/sys_template.php +++ b/includes/sys_template.php @@ -1,16 +1,5 @@ 'Engelsystem 33c3 (2016)', - '3' => 'Engelsystem 32c3 (2015)', - '2' => 'Engelsystem cccamp15', - '0' => 'Engelsystem light', - '1' => 'Engelsystem dark' -]; - /** * Display muted (grey) text. *