]> git.mxchange.org Git - friendica.git/commitdiff
Move Core\Session::set() to DI::session()->set()
authorPhilipp <admin@philipp.info>
Tue, 18 Oct 2022 19:12:23 +0000 (21:12 +0200)
committerPhilipp <admin@philipp.info>
Tue, 18 Oct 2022 19:12:23 +0000 (21:12 +0200)
src/App.php
src/Core/Session.php
src/Module/Conversation/Network.php
src/Module/Delegation.php
src/Module/Profile/Status.php
src/Module/Settings/TwoFactor/Verify.php
src/Module/Update/Profile.php

index 003ff5658984e3b55685b18ddcdf52cbf0c59592..95b0716e2808a784ddaa686980d6451ef99b615e 100644 (file)
@@ -634,8 +634,8 @@ class App
                                if ((parse_url($_GET['zrl'], PHP_URL_QUERY) == '') &&
                                        strstr(parse_url($_GET['zrl'], PHP_URL_PATH), '/profile/')) {
                                        if ($this->session->get('visitor_home') != $_GET['zrl']) {
-                                               Core\Session::set('my_url', $_GET['zrl']);
-                                               Core\Session::set('authenticated', 0);
+                                               $this->session->set('my_url', $_GET['zrl']);
+                                               $this->session->set('authenticated', 0);
 
                                                $remote_contact = Contact::getByURL($_GET['zrl'], false, ['subscribe']);
                                                if (!empty($remote_contact['subscribe'])) {
index 9deadbedb220d9d6ef89be967355d492812a9c7f..1af219dd57eb9199dbe9d80c8de89cd0d1a74e8f 100644 (file)
@@ -34,11 +34,6 @@ class Session
        public static $exists = false;
        public static $expire = 180000;
 
-       public static function set($name, $value)
-       {
-               DI::session()->set($name, $value);
-       }
-
        public static function setMultiple(array $values)
        {
                DI::session()->setMultiple($values);
index d5f4f6d2fc72396e46a2aae7863dfdd6bcb98a8b..ed32744d38f83bbb2903e117b20ec787fe15b6d5 100644 (file)
@@ -345,7 +345,7 @@ class Network extends BaseModule
                        self::$star = false;
                }
 
-               Session::set('network-tab', self::$selectedTab);
+               DI::session()->set('network-tab', self::$selectedTab);
                DI::pConfig()->set(local_user(), 'network.view', 'selected_tab', self::$selectedTab);
 
                self::$accountTypeString = $get['accounttype'] ?? $this->parameters['accounttype'] ?? '';
index f8aeb4c762a5ed30cd9df63470340d39a8023c35..e3ae977e2d1dd37964b7d931ceb49b49c1e2ffbf 100644 (file)
@@ -102,7 +102,7 @@ class Delegation extends BaseModule
                DI::auth()->setForUser(DI::app(), $user, true, true);
 
                if ($limited_id) {
-                       Session::set('submanage', $original_id);
+                       DI::session()->set('submanage', $original_id);
                }
 
                $ret = [];
index 2bf9b429be616c4c3728ef41906d4c41ae68da12..fa3f36e88564695419a33fbee1712d2e8b4818e4 100644 (file)
@@ -189,7 +189,7 @@ class Status extends BaseProfile
                // Set a time stamp for this page. We will make use of it when we
                // search for new items (update routine)
                $last_updated_array[$last_updated_key] = time();
-               Session::set('last_updated', $last_updated_array);
+               DI::session()->set('last_updated', $last_updated_array);
 
                if ($is_owner && !DI::config()->get('theme', 'hide_eventlist')) {
                        $o .= ProfileModel::getBirthdays();
index 820f7e255a19f89ecc9dfd5cfaff927218d4ae18..86e9af5aee01de1013c4e974319613c57c414b86 100644 (file)
@@ -86,7 +86,7 @@ class Verify extends BaseSettings
 
                        if ($valid) {
                                $this->pConfig->set(local_user(), '2fa', 'verified', true);
-                               Session::set('2fa', true);
+                               DI::session()->set('2fa', true);
 
                                DI::sysmsg()->addInfo($this->t('Two-factor authentication successfully activated.'));
 
index 4d6793605e783a39850585bb3af3f03d0d62b1d1..4a1360fb9af34d2aeac6cb116d4b9ffd8dcf79ca 100644 (file)
@@ -102,7 +102,7 @@ class Profile extends BaseModule
                // Set a time stamp for this page. We will make use of it when we
                // search for new items (update routine)
                $last_updated_array[$last_updated_key] = time();
-               Session::set('last_updated', $last_updated_array);
+               DI::session()->set('last_updated', $last_updated_array);
 
                if ($is_owner && !$a->getProfileOwner() && !DI::config()->get('theme', 'hide_eventlist')) {
                        $o .= ProfileModel::getBirthdays();