X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FContact.php;h=5ae99552235fae196192adf784edd6eb6873296a;hb=3940e804e3ee4ac921e109f62a73fac2becaa611;hp=798c9cd20929d9bc996045c90d3ff30ac9a10961;hpb=482cf1bbfeb7e60f9618c309fefcf7dfe7608e7e;p=friendica.git diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 798c9cd209..5ae9955223 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -13,6 +13,7 @@ use Friendica\Core\L10n; use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Core\System; +use Friendica\Core\Session; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\Network\Probe; @@ -1193,7 +1194,7 @@ class Contact extends BaseObject $sparkle = false; if (($contact['network'] === Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) { $sparkle = true; - $profile_link = System::baseUrl() . '/redir/' . $contact['id'] . '?url=' . $contact['url']; + $profile_link = System::baseUrl() . '/redir/' . $contact['id']; } else { $profile_link = $contact['url']; } @@ -1213,7 +1214,7 @@ class Contact extends BaseObject } if (($contact['network'] == Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) { - $poke_link = System::baseUrl() . '/poke/?f=&c=' . $contact['id']; + $poke_link = System::baseUrl() . '/poke/?c=' . $contact['id']; } $contact_url = System::baseUrl() . '/contact/' . $contact['id']; @@ -1480,7 +1481,7 @@ class Contact extends BaseObject $data = Probe::uri($url, "", $uid); // Ensure that there is a gserver entry if (!empty($data['baseurl']) && ($data['network'] != Protocol::PHANTOM)) { - PortableContact::checkServer($data['baseurl']); + GServer::check($data['baseurl']); } } @@ -2679,7 +2680,7 @@ class Contact extends BaseObject */ public static function magicLink($contact_url, $url = '') { - if (!local_user() && !remote_user()) { + if (!Session::isAuthenticated()) { return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url; } @@ -2725,7 +2726,7 @@ class Contact extends BaseObject { $destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url']; - if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) { + if (!Session::isAuthenticated() || ($contact['network'] != Protocol::DFRN)) { return $destination; } @@ -2744,7 +2745,7 @@ class Contact extends BaseObject $redirect = 'redir/' . $contact['id']; - if ($url != '') { + if (($url != '') && !Strings::compareLink($contact['url'], $url)) { $redirect .= '?url=' . $url; }