summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-07-20 01:14:28 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-07-20 01:14:28 +0200
commit7d5d905fcf03a67f606154feee6173581640708f (patch)
tree50f258f94dd980ba53d808d9a4896ab242b30f20
parentb7ebb05b8e71b391b6b029fceb5a2d00ff27004c (diff)
Moved $themes array to config
-rw-r--r--config/config.default.php11
-rw-r--r--includes/pages/user_settings.php3
-rw-r--r--includes/sys_template.php11
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,17 +1,6 @@
<?php
/**
- * Liste der verfügbaren Themes
- */
-$themes = [
- '4' => 'Engelsystem 33c3 (2016)',
- '3' => 'Engelsystem 32c3 (2015)',
- '2' => 'Engelsystem cccamp15',
- '0' => 'Engelsystem light',
- '1' => 'Engelsystem dark'
-];
-
-/**
* Display muted (grey) text.
*
* @param string $text