Merge pull request #6761 from tobiasd/20190226-6532
fixing links in photoMenu
This commit is contained in:
commit
ef0e734c82
2 changed files with 8 additions and 8 deletions
|
@ -850,7 +850,7 @@ function item_photo_menu($item) {
|
||||||
|
|
||||||
$author = ['uid' => 0, 'id' => $item['author-id'],
|
$author = ['uid' => 0, 'id' => $item['author-id'],
|
||||||
'network' => $item['author-network'], 'url' => $item['author-link']];
|
'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);
|
$sparkle = (strpos($profile_link, 'redir/') === 0);
|
||||||
|
|
||||||
$cid = 0;
|
$cid = 0;
|
||||||
|
@ -865,9 +865,9 @@ function item_photo_menu($item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sparkle) {
|
if ($sparkle) {
|
||||||
$status_link = $profile_link . '?url=status';
|
$status_link = $profile_link . '?tab=status';
|
||||||
$photos_link = $profile_link . '?url=photos';
|
$photos_link = str_replace('/profile/', '/photos/', $profile_link);
|
||||||
$profile_link = $profile_link . '?url=profile';
|
$profile_link = $profile_link . '?=profile';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cid && !$item['self']) {
|
if ($cid && !$item['self']) {
|
||||||
|
|
|
@ -1006,7 +1006,7 @@ class Contact extends BaseObject
|
||||||
$sparkle = false;
|
$sparkle = false;
|
||||||
if (($contact['network'] === Protocol::DFRN) && !$contact['self']) {
|
if (($contact['network'] === Protocol::DFRN) && !$contact['self']) {
|
||||||
$sparkle = true;
|
$sparkle = true;
|
||||||
$profile_link = System::baseUrl() . '/redir/' . $contact['id'];
|
$profile_link = System::baseUrl() . '/redir/' . $contact['id'] . '?url=' . $contact['url'];
|
||||||
} else {
|
} else {
|
||||||
$profile_link = $contact['url'];
|
$profile_link = $contact['url'];
|
||||||
}
|
}
|
||||||
|
@ -1016,9 +1016,9 @@ class Contact extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sparkle) {
|
if ($sparkle) {
|
||||||
$status_link = $profile_link . '?url=status';
|
$status_link = $profile_link . '?tab=status';
|
||||||
$photos_link = $profile_link . '?url=photos';
|
$photos_link = str_replace('/profile/', '/photos/', $profile_link);
|
||||||
$profile_link = $profile_link . '?url=profile';
|
$profile_link = $profile_link . '?tab=profile';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA]) && !$contact['self']) {
|
if (in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA]) && !$contact['self']) {
|
||||||
|
|
Loading…
Reference in a new issue