From 5e6b23bd4eaccc1f75c4141c56819f81fc324733 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Sun, 14 Jul 2019 10:48:24 +0200 Subject: [PATCH] Fixed issues --- view/theme/frio/style.php | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index 12cf8d20ac..18211f4702 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -16,27 +16,6 @@ $scheme_modified = 0; if ($a->module !== 'install') { - Config::load('frio'); - - // Load frios system config. - $scheme = Config::get('frio', 'scheme', Config::get('frio', 'schema')); - $nav_bg = Config::get('frio', 'nav_bg', '#708fa0'); - $nav_icon_color = Config::get('frio', 'nav_icon_color', '#fff'); - $link_color = Config::get('frio', 'link_color', '#6fdbe8'); - $background_color = Config::get('frio', 'background_color', '#ededed'); - $contentbg_transp = Config::get('frio', 'contentbg_transp'); - $background_image = Config::get('frio', 'background_image', 'img/none.png'); - $bg_image_option = Config::get('frio', 'bg_image_option'); - $login_bg_image = Config::get('frio', 'login_bg_image'); - $login_bg_color = Config::get('frio', 'login_bg_color'); - $modified = Config::get('frio', 'css_modified'); - - // There is maybe the case that the user did never modify the theme settings. - // In this case we store the present time. - if (empty($modified)) { - Config::set('frio', 'css_modified', time()); - } - // Get the UID of the profile owner. $uid = defaults($_REQUEST, 'puid', 0); if ($uid) { @@ -59,6 +38,27 @@ if ($a->module !== 'install') { PConfig::set($uid, 'frio', 'css_modified', time()); } } + + Config::load('frio'); + + // Load frios system config. + $scheme = (empty($scheme) ? Config::get('frio', 'scheme', Config::get('frio', 'schema')) : $scheme); + $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); + $contentbg_transp = (empty($contentbg_transp) ? Config::get('frio', 'contentbg_transp') : $contentbg_transp); + $background_image = (empty($background_image) ? Config::get('frio', 'background_image', 'img/none.png') : $background_image); + $bg_image_option = (empty($bg_image_option) ? Config::get('frio', 'bg_image_option') : $bg_image_option); + $login_bg_image = (empty($login_bg_image) ? Config::get('frio', 'login_bg_image') : $login_bg_image); + $login_bg_color = (empty($login_bg_color) ? Config::get('frio', 'login_bg_color') : $login_bg_color; + $modified = (empty($modified) ? Config::get('frio', 'css_modified') : $modified); + + // There is maybe the case that the user did never modify the theme settings. + // In this case we store the present time. + if (empty($modified)) { + Config::set('frio', 'css_modified', time()); + } } // Now load the scheme. If a value is changed above, we'll keep the settings -- 2.39.5