From 7feeb0af78caabcffefc115ebc69cc45a7c529a3 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 26 Apr 2018 04:22:04 -0400 Subject: [PATCH] Add backward-compatibility for config variables after schema rename --- view/theme/frio/config.php | 4 ++-- view/theme/frio/php/default.php | 2 +- view/theme/frio/php/scheme.php | 2 +- view/theme/frio/style.php | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 26f725f25..55a653696 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -55,7 +55,7 @@ function theme_content(App $a) } $arr = []; - $arr['scheme'] = PConfig::get(local_user(), 'frio', 'scheme'); + $arr['scheme'] = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'schema')); $arr['nav_bg'] = PConfig::get(local_user(), 'frio', 'nav_bg'); $arr['nav_icon_color'] = PConfig::get(local_user(), 'frio', 'nav_icon_color'); $arr['link_color'] = PConfig::get(local_user(), 'frio', 'link_color'); @@ -74,7 +74,7 @@ function theme_admin(App $a) } $arr = []; - $arr['scheme'] = Config::get('frio', 'scheme'); + $arr['scheme'] = Config::get('frio', 'scheme', Config::get('frio', 'scheme')); $arr['nav_bg'] = Config::get('frio', 'nav_bg'); $arr['nav_icon_color'] = Config::get('frio', 'nav_icon_color'); $arr['link_color'] = Config::get('frio', 'link_color'); diff --git a/view/theme/frio/php/default.php b/view/theme/frio/php/default.php index 234e1476f..428d88788 100644 --- a/view/theme/frio/php/default.php +++ b/view/theme/frio/php/default.php @@ -43,7 +43,7 @@ if (!isset($minimal)) { if (is_null($uid)) { $uid = Profile::getThemeUid(); } - $scheme = PConfig::get($uid, 'frio', 'scheme'); + $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema')); if (($scheme) && ($scheme != '---')) { if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) { $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php'; diff --git a/view/theme/frio/php/scheme.php b/view/theme/frio/php/scheme.php index e52f86126..02de0a035 100644 --- a/view/theme/frio/php/scheme.php +++ b/view/theme/frio/php/scheme.php @@ -23,7 +23,7 @@ function get_scheme_info($scheme) { $theme = current_theme(); $themepath = 'view/theme/' . $theme . '/'; - $scheme = PConfig::get(local_user(), 'frio', 'scheme'); + $scheme = PConfig::get(local_user(), 'frio', 'scheme', PConfig::get(local_user(), 'frio', 'scheme')); $info = [ 'name' => $scheme, diff --git a/view/theme/frio/style.php b/view/theme/frio/style.php index 393dca2f9..621f5d0cc 100644 --- a/view/theme/frio/style.php +++ b/view/theme/frio/style.php @@ -19,7 +19,7 @@ if ($a->module !== 'install') { PConfig::load($uid, 'frio'); // Load the profile owners pconfig. - $scheme = PConfig::get($uid, 'frio', 'scheme'); + $scheme = PConfig::get($uid, 'frio', 'scheme', PConfig::get($uid, 'frio', 'schema')); $nav_bg = PConfig::get($uid, 'frio', 'nav_bg'); $nav_icon_color = PConfig::get($uid, 'frio', 'nav_icon_color'); $link_color = PConfig::get($uid, 'frio', 'link_color'); @@ -38,7 +38,7 @@ if ($a->module !== 'install') { Config::load('frio'); // Load frios system config. - $scheme = Config::get('frio', 'scheme'); + $scheme = Config::get('frio', 'scheme', 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');