mirror of
https://github.com/friendica/friendica
synced 2025-04-20 13:10:13 +00:00
Fix local avatar, improve speed for fetching cached photos
This commit is contained in:
parent
776ce3f63a
commit
fae414fedd
5 changed files with 54 additions and 49 deletions
|
@ -304,10 +304,12 @@ class Photo extends BaseModule
|
|||
$photo = MPhoto::selectFirst([], ['resource-id' => $resourceid], ['order' => ['scale']]);
|
||||
if (!empty($photo)) {
|
||||
return $photo;
|
||||
} else {
|
||||
$url = $contact['avatar'];
|
||||
}
|
||||
} else {
|
||||
$url = $contact['photo'];
|
||||
}
|
||||
// We continue with the avatar link when the photo link is invalid
|
||||
$url = $contact['avatar'];
|
||||
} elseif (!empty($contact['avatar'])) {
|
||||
$url = $contact['avatar'];
|
||||
}
|
||||
|
@ -340,6 +342,7 @@ class Photo extends BaseModule
|
|||
}
|
||||
}
|
||||
if (empty($mimetext)) {
|
||||
Logger::info('Blubb');
|
||||
if ($customsize <= Proxy::PIXEL_MICRO) {
|
||||
$url = Contact::getDefaultAvatar($contact, Proxy::SIZE_MICRO);
|
||||
} elseif ($customsize <= Proxy::PIXEL_THUMB) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue