mirror of
https://github.com/friendica/friendica
synced 2025-04-29 21:04:24 +02:00
Merge pull request #7606 from annando/fix-invalid-url
Replace not working "redir" link with a working one
This commit is contained in:
commit
3d5d50a25b
3 changed files with 7 additions and 3 deletions
|
@ -2707,8 +2707,10 @@ class Contact extends BaseObject
|
|||
*/
|
||||
public static function magicLinkByContact($contact, $url = '')
|
||||
{
|
||||
$destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||
|
||||
if ((!local_user() && !remote_user()) || ($contact['network'] != Protocol::DFRN)) {
|
||||
return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||
return $destination;
|
||||
}
|
||||
|
||||
// Only redirections to the same host do make sense
|
||||
|
@ -2721,7 +2723,7 @@ class Contact extends BaseObject
|
|||
}
|
||||
|
||||
if (empty($contact['id'])) {
|
||||
return $url ?: $contact['url'];
|
||||
return $destination;
|
||||
}
|
||||
|
||||
$redirect = 'redir/' . $contact['id'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue