Don't use the "url" parameter on redir if it points to the same contact

This commit is contained in:
Michael 2019-09-24 21:44:37 +00:00
parent 8a5eb689f7
commit 87462ec67f

View File

@ -1193,7 +1193,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'];
}
@ -2744,7 +2744,7 @@ class Contact extends BaseObject
$redirect = 'redir/' . $contact['id'];
if ($url != '') {
if (($url != '') && !Strings::compareLink($contact['url'], $url)) {
$redirect .= '?url=' . $url;
}