mirror of
https://github.com/friendica/friendica
synced 2025-04-29 19:44:22 +02:00
New function to store the "remote" session value / making the changes work
This commit is contained in:
parent
ec66553032
commit
704cdf1b5a
5 changed files with 33 additions and 41 deletions
|
@ -1116,17 +1116,7 @@ class Profile
|
|||
$_SESSION['visitor_home'] = $visitor['url'];
|
||||
$_SESSION['my_url'] = $visitor['url'];
|
||||
|
||||
/// @todo replace this and the query for this variable with some cleaner functionality
|
||||
$_SESSION['remote'] = [];
|
||||
|
||||
$remote_contacts = DBA::select('contact', ['id', 'uid'], ['nurl' => $visitor['nurl'], 'rel' => [Contact::FOLLOWER, Contact::FRIEND], 'self' => false]);
|
||||
while ($contact = DBA::fetch($remote_contacts)) {
|
||||
if (($contact['uid'] == 0) || Contact::isBlockedByUser($visitor['id'], $contact['uid'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$_SESSION['remote'][$contact['uid']] = $contact['id'];
|
||||
}
|
||||
Session::setVisitorsContacts();
|
||||
|
||||
$a->contact = $visitor;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue