$author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']];
- $profile_link = Contact::magicLinkByContact($author);
+ $profile_link = Contact::magicLinkByContact($author, $item['author-link']);
$sparkle = (strpos($profile_link, 'redir/') === 0);
$cid = 0;
}
if ($sparkle) {
- $status_link = $profile_link . '?url=status';
- $photos_link = $profile_link . '?url=photos';
- $profile_link = $profile_link . '?url=profile';
+ $status_link = $profile_link . '?tab=status';
+ $photos_link = str_replace('/profile/', '/photos/', $profile_link);
+ $profile_link = $profile_link . '?=profile';
}
if ($cid && !$item['self']) {
$sparkle = false;
if (($contact['network'] === Protocol::DFRN) && !$contact['self']) {
$sparkle = true;
- $profile_link = System::baseUrl() . '/redir/' . $contact['id'];
+ $profile_link = System::baseUrl() . '/redir/' . $contact['id'] . '?url=' . $contact['url'];
} else {
$profile_link = $contact['url'];
}
}
if ($sparkle) {
- $status_link = $profile_link . '?url=status';
- $photos_link = $profile_link . '?url=photos';
- $profile_link = $profile_link . '?url=profile';
+ $status_link = $profile_link . '?tab=status';
+ $photos_link = str_replace('/profile/', '/photos/', $profile_link);
+ $profile_link = $profile_link . '?tab=profile';
}
if (in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA]) && !$contact['self']) {