mirror of
https://github.com/friendica/friendica
synced 2025-04-30 03:44: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'];
|
||||
|
|
|
@ -656,6 +656,8 @@ class Photo extends BaseObject
|
|||
continue;
|
||||
}
|
||||
|
||||
/// @todo Check if $str_contact_allow does contain a public forum. Then set the permissions to public.
|
||||
|
||||
$fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow,
|
||||
'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny];
|
||||
$condition = ['resource-id' => $image_uri, 'uid' => $uid];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue