kopia lustrzana https://github.com/friendica/friendica
Issue 10443: Fix requesting media content
rodzic
5333ae4a3c
commit
ffdbac7e41
|
@ -168,9 +168,6 @@ class Photo extends BaseModule
|
|||
return false;
|
||||
}
|
||||
|
||||
$author = Contact::selectFirst([], ["`id` IN (SELECT `author-id` FROM `post` WHERE `uri-id` = ?)", $media['uri-id']]);
|
||||
$url = Contact::magicLinkByContact($author, $url);
|
||||
|
||||
return MPhoto::createPhotoForExternalResource($url, (int)local_user());
|
||||
case "media":
|
||||
$media = DBA::selectFirst('post-media', ['url', 'uri-id'], ['id' => $uid, 'type' => Post\Media::IMAGE]);
|
||||
|
@ -178,10 +175,7 @@ class Photo extends BaseModule
|
|||
return false;
|
||||
}
|
||||
|
||||
$author = Contact::selectFirst([], ["`id` IN (SELECT `author-id` FROM `post` WHERE `uri-id` = ?)", $media['uri-id']]);
|
||||
$url = Contact::magicLinkByContact($author, $media['url']);
|
||||
|
||||
return MPhoto::createPhotoForExternalResource($url, (int)local_user());
|
||||
return MPhoto::createPhotoForExternalResource($media['url'], (int)local_user());
|
||||
case "contact":
|
||||
$contact = Contact::getById($uid, ['uid', 'url', 'avatar', 'photo', 'xmpp', 'addr']);
|
||||
if (empty($contact)) {
|
||||
|
|
Ładowanie…
Reference in New Issue