mirror of
https://github.com/friendica/friendica
synced 2025-04-22 18:30:13 +00:00
Fix magic links in contact photo menu
- They were using a URL format obsolete for years
This commit is contained in:
parent
878f144bc1
commit
ff80e46eb0
2 changed files with 9 additions and 16 deletions
|
@ -1152,10 +1152,11 @@ class Contact
|
|||
$status_link = '';
|
||||
$photos_link = '';
|
||||
|
||||
$sparkle = false;
|
||||
if (($contact['network'] === Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) {
|
||||
$sparkle = true;
|
||||
$profile_link = 'contact/redir/' . $contact['id'];
|
||||
$status_link = $profile_link . '?' . http_build_query(['url' => $contact['url'] . '/status']);
|
||||
$photos_link = $profile_link . '?' . http_build_query(['url' => $contact['url'] . '/photos']);
|
||||
$profile_link = $profile_link . '?' . http_build_query(['url' => $contact['url'] . '/profile']);
|
||||
} else {
|
||||
$profile_link = $contact['url'];
|
||||
}
|
||||
|
@ -1164,12 +1165,6 @@ class Contact
|
|||
$profile_link = '';
|
||||
}
|
||||
|
||||
if ($sparkle) {
|
||||
$status_link = $profile_link . '/status';
|
||||
$photos_link = $profile_link . '/photos';
|
||||
$profile_link = $profile_link . '/profile';
|
||||
}
|
||||
|
||||
if (self::canReceivePrivateMessages($contact) && empty($contact['pending'])) {
|
||||
$pm_url = 'message/new/' . $contact['id'];
|
||||
}
|
||||
|
@ -3444,7 +3439,7 @@ class Contact
|
|||
*/
|
||||
public static function magicLinkByContact(array $contact, string $url = ''): string
|
||||
{
|
||||
$destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||
$destination = $url ?: $contact['url'];
|
||||
|
||||
if (!DI::userSession()->isAuthenticated()) {
|
||||
return $destination;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue