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