Move Config::get() to DI::config()->get()

This commit is contained in:
nupplaPhil 2020-01-19 21:21:13 +01:00
parent 5d294e8be8
commit 6c36fd9e01
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
126 changed files with 581 additions and 596 deletions

View file

@ -33,7 +33,7 @@ function theme_post(App $a)
function theme_admin(App $a)
{
$colorset = Config::get('duepuntozero', 'colorset');
$colorset = DI::config()->get('duepuntozero', 'colorset');
$user = false;
return clean_form($a, $colorset, $user);
@ -62,7 +62,7 @@ function clean_form(App $a, &$colorset, $user)
if ($user) {
$color = DI::pConfig()->get(local_user(), 'duepuntozero', 'colorset');
} else {
$color = Config::get('duepuntozero', 'colorset');
$color = DI::config()->get('duepuntozero', 'colorset');
}
$t = Renderer::getMarkupTemplate("theme_settings.tpl");

View file

@ -11,7 +11,7 @@ if (file_exists("$THEMEPATH/style.css")) {
$uid = $_REQUEST['puid'] ?? 0;
$s_colorset = Config::get('duepuntozero', 'colorset');
$s_colorset = DI::config()->get('duepuntozero', 'colorset');
$colorset = DI::pConfig()->get($uid, 'duepuntozero', 'colorset');
if (empty($colorset)) {

View file

@ -11,7 +11,7 @@ Renderer::setActiveTemplateEngine('smarty3');
$colorset = DI::pConfig()->get( local_user(), 'duepuntozero','colorset');
if (!$colorset)
$colorset = Config::get('duepuntozero', 'colorset'); // user setting have priority, then node settings
$colorset = DI::config()->get('duepuntozero', 'colorset'); // user setting have priority, then node settings
if ($colorset) {
if ($colorset == 'greenzero')
DI::page()['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";