Browse Source

Add backward-compatibility for config variables after schema rename

pull/4930/head
Hypolite Petovan 4 years ago
parent
commit
7feeb0af78
  1. 4
      view/theme/frio/config.php
  2. 2
      view/theme/frio/php/default.php
  3. 2
      view/theme/frio/php/scheme.php
  4. 4
      view/theme/frio/style.php

4
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');

2
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';

2
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,

4
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');

Loading…
Cancel
Save