X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fduepuntozero%2Fconfig.php;h=a64f6f5fedaf0d7fd32ca24f6cf7782e8730999a;hb=35ca4961d21c807b85af97295961c5d513f5be50;hp=1a2d231f431d464d6323722d714d3581d6f2fd5a;hpb=11944dda3241c0a015944b6a82147ba5e5755998;p=friendica.git diff --git a/view/theme/duepuntozero/config.php b/view/theme/duepuntozero/config.php index 1a2d231f43..a64f6f5fed 100644 --- a/view/theme/duepuntozero/config.php +++ b/view/theme/duepuntozero/config.php @@ -21,16 +21,15 @@ use Friendica\App; use Friendica\Core\Renderer; -use Friendica\Core\Session; use Friendica\DI; function theme_content(App $a) { - if (!Session::getLocalUser()) { + if (!DI::userSession()->getLocalUserId()) { return; } - $colorset = DI::pConfig()->get(Session::getLocalUser(), 'duepuntozero', 'colorset'); + $colorset = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'duepuntozero', 'colorset'); $user = true; return clean_form($a, $colorset, $user); @@ -38,12 +37,12 @@ function theme_content(App $a) function theme_post(App $a) { - if (! Session::getLocalUser()) { + if (!DI::userSession()->getLocalUserId()) { return; } if (isset($_POST['duepuntozero-settings-submit'])) { - DI::pConfig()->set(Session::getLocalUser(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']); + DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']); } } @@ -76,7 +75,7 @@ function clean_form(App $a, &$colorset, $user) ]; if ($user) { - $color = DI::pConfig()->get(Session::getLocalUser(), 'duepuntozero', 'colorset'); + $color = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'duepuntozero', 'colorset'); } else { $color = DI::config()->get('duepuntozero', 'colorset'); }