X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FSession.php;h=059cd499c080513d038e0329f1f929b82c59e7e4;hb=f9b7f3acdb92ef87c87007efcec65e38ad31a684;hp=c4fbb3f8c6d043b9764a0ef2623c64a92e2752d9;hpb=4965d6aa54e8bfd51f8a50d5ec782400c6330f22;p=friendica.git diff --git a/src/Core/Session.php b/src/Core/Session.php index c4fbb3f8c6..059cd499c0 100644 --- a/src/Core/Session.php +++ b/src/Core/Session.php @@ -1,6 +1,6 @@ get($name, $defaults); } + public static function pop($name, $defaults = null) + { + return DI::session()->pop($name, $defaults); + } + public static function set($name, $value) { DI::session()->set($name, $value); @@ -116,16 +121,17 @@ class Session $session = DI::session(); $session->set('remote', []); + $remote = []; $remote_contacts = DBA::select('contact', ['id', 'uid'], ['nurl' => Strings::normaliseLink($session->get('my_url')), 'rel' => [Contact::FOLLOWER, Contact::FRIEND], 'self' => false]); while ($contact = DBA::fetch($remote_contacts)) { if (($contact['uid'] == 0) || Contact\User::isBlocked($contact['id'], $contact['uid'])) { continue; } - - $session->set('remote', [$contact['uid'] => $contact['id']]); + $remote[$contact['uid']] = $contact['id']; } DBA::close($remote_contacts); + $session->set('remote', $remote); } /**