From da4fc0411e909d62e132450eec73190f180cbba9 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 24 Feb 2019 15:40:05 +0100 Subject: [PATCH 1/2] Fixing admin scheme-change in frio --- view/theme/frio/php/scheme.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/view/theme/frio/php/scheme.php b/view/theme/frio/php/scheme.php index 2f09180439..fa7d4a3fe5 100644 --- a/view/theme/frio/php/scheme.php +++ b/view/theme/frio/php/scheme.php @@ -17,13 +17,16 @@ * 'version' => Scheme version * 'overwrites' => Variables which overwriting custom settings */ + use Friendica\Core\PConfig; function get_scheme_info($scheme) { $theme = \get_app()->getCurrentTheme(); $themepath = 'view/theme/' . $theme . '/'; - $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme')); + if (!isset($scheme)) { + $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme')); + } $info = [ 'name' => $scheme, From 758444a7d29feec4944626abd3fc3007ae2964ef Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 24 Feb 2019 15:48:30 +0100 Subject: [PATCH 2/2] empty is better than isset --- view/theme/frio/php/scheme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/php/scheme.php b/view/theme/frio/php/scheme.php index fa7d4a3fe5..9e3f610cd5 100644 --- a/view/theme/frio/php/scheme.php +++ b/view/theme/frio/php/scheme.php @@ -24,7 +24,7 @@ function get_scheme_info($scheme) { $theme = \get_app()->getCurrentTheme(); $themepath = 'view/theme/' . $theme . '/'; - if (!isset($scheme)) { + if (empty($scheme)) { $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme')); }