Replace defaults() calls in frio/config.php

- Fix typo for scheme/schema
pull/7381/head
Hypolite Petovan 2019-07-14 21:57:47 -04:00
rodzic c24ca57f21
commit ee52eb575e
1 zmienionych plików z 19 dodań i 19 usunięć

Wyświetl plik

@ -16,14 +16,14 @@ function theme_post(App $a)
}
if (isset($_POST['frio-settings-submit'])) {
PConfig::set(local_user(), 'frio', 'scheme', defaults($_POST, 'frio_scheme', ''));
PConfig::set(local_user(), 'frio', 'nav_bg', defaults($_POST, 'frio_nav_bg', ''));
PConfig::set(local_user(), 'frio', 'nav_icon_color', defaults($_POST, 'frio_nav_icon_color', ''));
PConfig::set(local_user(), 'frio', 'link_color', defaults($_POST, 'frio_link_color', ''));
PConfig::set(local_user(), 'frio', 'background_color', defaults($_POST, 'frio_background_color', ''));
PConfig::set(local_user(), 'frio', 'contentbg_transp', defaults($_POST, 'frio_contentbg_transp', ''));
PConfig::set(local_user(), 'frio', 'background_image', defaults($_POST, 'frio_background_image', ''));
PConfig::set(local_user(), 'frio', 'bg_image_option', defaults($_POST, 'frio_bg_image_option', ''));
PConfig::set(local_user(), 'frio', 'scheme', $_POST['frio_scheme'] ?? '');
PConfig::set(local_user(), 'frio', 'nav_bg', $_POST['frio_nav_bg'] ?? '');
PConfig::set(local_user(), 'frio', 'nav_icon_color', $_POST['frio_nav_icon_color'] ?? '');
PConfig::set(local_user(), 'frio', 'link_color', $_POST['frio_link_color'] ?? '');
PConfig::set(local_user(), 'frio', 'background_color', $_POST['frio_background_color'] ?? '');
PConfig::set(local_user(), 'frio', 'contentbg_transp', $_POST['frio_contentbg_transp'] ?? '');
PConfig::set(local_user(), 'frio', 'background_image', $_POST['frio_background_image'] ?? '');
PConfig::set(local_user(), 'frio', 'bg_image_option', $_POST['frio_bg_image_option'] ?? '');
PConfig::set(local_user(), 'frio', 'css_modified', time());
}
}
@ -35,16 +35,16 @@ function theme_admin_post(App $a)
}
if (isset($_POST['frio-settings-submit'])) {
Config::set('frio', 'scheme', defaults($_POST, 'frio_scheme', ''));
Config::set('frio', 'nav_bg', defaults($_POST, 'frio_nav_bg', ''));
Config::set('frio', 'nav_icon_color', defaults($_POST, 'frio_nav_icon_color', ''));
Config::set('frio', 'link_color', defaults($_POST, 'frio_link_color', ''));
Config::set('frio', 'background_color', defaults($_POST, 'frio_background_color', ''));
Config::set('frio', 'contentbg_transp', defaults($_POST, 'frio_contentbg_transp', ''));
Config::set('frio', 'background_image', defaults($_POST, 'frio_background_image', ''));
Config::set('frio', 'bg_image_option', defaults($_POST, 'frio_bg_image_option', ''));
Config::set('frio', 'login_bg_image', defaults($_POST, 'frio_login_bg_image', ''));
Config::set('frio', 'login_bg_color', defaults($_POST, 'frio_login_bg_color', ''));
Config::set('frio', 'scheme', $_POST['frio_scheme'] ?? '');
Config::set('frio', 'nav_bg', $_POST['frio_nav_bg'] ?? '');
Config::set('frio', 'nav_icon_color', $_POST['frio_nav_icon_color'] ?? '');
Config::set('frio', 'link_color', $_POST['frio_link_color'] ?? '');
Config::set('frio', 'background_color', $_POST['frio_background_color'] ?? '');
Config::set('frio', 'contentbg_transp', $_POST['frio_contentbg_transp'] ?? '');
Config::set('frio', 'background_image', $_POST['frio_background_image'] ?? '');
Config::set('frio', 'bg_image_option', $_POST['frio_bg_image_option'] ?? '');
Config::set('frio', 'login_bg_image', $_POST['frio_login_bg_image'] ?? '');
Config::set('frio', 'login_bg_color', $_POST['frio_login_bg_color'] ?? '');
Config::set('frio', 'css_modified', time());
}
}
@ -78,7 +78,7 @@ function theme_admin(App $a)
}
$arr = [];
$arr['scheme'] = Config::get('frio', 'scheme', Config::get('frio', 'scheme'));
$arr['scheme'] = Config::get('frio', 'scheme', Config::get('frio', 'schema'));
$arr['share_string'] = '';
$arr['nav_bg'] = Config::get('frio', 'nav_bg');
$arr['nav_icon_color'] = Config::get('frio', 'nav_icon_color');