From 660ed6df22f167e353d8867b4787d283db537c28 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Sun, 14 Jul 2019 10:57:54 +0200 Subject: [PATCH] Updated towards hypolite's first suggestion --- view/theme/frio/style.php | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index 57abd77114..b47c38bbab 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -93,22 +93,15 @@ if (!$scheme) { $schemecssfile = 'view/theme/frio/scheme/default.css'; } } -//If no scheme was set default to login theme. -$nav_bg = (empty($nav_bg) ? Config::get('frio', 'nav_bg') : $nav_bg); -$nav_icon_color = (empty($nav_icon_color) ? Config::get('frio', 'nav_icon_color') : $nav_icon_color); -$link_color = (empty($link_color) ? Config::get('frio', 'link_color') : $link_color); -$background_color = (empty($background_color) ? Config::get('frio', 'background_color') : $background_color); -$background_image = (empty($background_image) ? Config::get('frio', 'background_image') : $background_image); - -//If login theme unset default to master default + //Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting //individually. If we don't, we'll have problems if a user has set one, but not all options. -$nav_bg = (empty($nav_bg) ? '#708fa0' : $nav_bg); -$nav_icon_color = (empty($nav_icon_color) ? '#fff' : $nav_icon_color); -$link_color = (empty($link_color) ? '#6fdbe8' : $link_color); -$background_color = (empty($background_color) ? '#ededed' : $background_color); +$nav_bg = (empty($nav_bg) ? Config::get('frio', 'nav_bg', '#708fa0') : $nav_bg); +$nav_icon_color = (empty($nav_icon_color) ? Config::get('frio', 'nav_icon_color', '#fff') : $nav_icon_color); +$link_color = (empty($link_color) ? Config::get('frio', 'link_color', '#6fdbe8') : $link_color); +$background_color = (empty($background_color) ? Config::get('frio', 'background_color', '#ededed') : $background_color); // The background image can not be empty. So we use a dummy jpg if no image was set. -$background_image = (empty($background_image) ? 'img/none.png' : $background_image); +$background_image = (empty($background_image) ? Config::get('frio', 'background_image', 'img/none.png') : $background_image); $modified = (empty($modified) ? time() : $modified); -- 2.39.5