X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Ffrio%2Fstyle.php;h=04379b244ee14316f6bf127e4b0404ee02061a44;hb=7fe549b8d2ce8addc58fb308dccb194f88fcca6e;hp=041f890e29085117551e45f9aee78156bbf8b53b;hpb=1585918f2958399d9958438b09d67feb815b6daf;p=friendica.git diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index 041f890e29..04379b244e 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -1,6 +1,7 @@ install) { if (empty($modified)) { PConfig::set($uid, 'frio', 'css_modified', time()); } + } else { + Config::load('frio'); + + // Load frios system config. + $schema = Config::get("frio", "schema"); + $nav_bg = Config::get("frio", "nav_bg"); + $nav_icon_color = Config::get("frio", "nav_icon_color"); + $link_color = Config::get("frio", "link_color"); + $bgcolor = Config::get("frio", "background_color"); + $contentbg_transp = Config::get("frio", "contentbg_transp"); + $background_image = Config::get("frio", "background_image"); + $bg_image_option = Config::get("frio", "bg_image_option"); + $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()); + } } } @@ -40,6 +60,11 @@ if (! $a->install) { if ($_REQUEST['schema']) { $schema = $_REQUEST['schema']; } + +// Sanitize the data. +$schema = !empty($schema) ? basename($schema) : ""; + + if (($schema) && ($schema != '---')) { if (file_exists('view/theme/frio/schema/' . $schema . '.php')) { $schemefile = 'view/theme/frio/schema/' . $schema . '.php'; @@ -73,7 +98,7 @@ $bgcolor = (empty($bgcolor) ? "#ededed" : $bgcolor); $background_image = (empty($background_image) ? 'img/none.jpg' : $background_image); $modified = (empty($modified) ? time() :$modified); -$contentbg_transp = ((isset($contentbg_transp) && $contentbg_transp != "") ? $contentbg_transp : 100); +$contentbg_transp = ((isset($contentbg_transp) && $contentbg_transp != "") ? $contentbg_transp : 100); // Calculate some colors in dependance of existing colors. // Some colors are calculated to don't have too many selection