mirror of
https://github.com/friendica/friendica
synced 2025-04-30 11:04:29 +02:00
Unified avatar paths
This commit is contained in:
parent
9edc75e29d
commit
19aef93560
7 changed files with 24 additions and 18 deletions
|
@ -1501,10 +1501,10 @@ class Contact
|
|||
{
|
||||
if (!empty($contact)) {
|
||||
$contact = self::checkAvatarCacheByArray($contact, $no_update);
|
||||
if (!empty($contact[$field])) {
|
||||
return $contact[$field];
|
||||
} elseif (!empty($contact['id'])) {
|
||||
if (!empty($contact['id'])) {
|
||||
return self::getAvatarUrlForId($contact['id'], $size, $contact['updated'] ?? '');
|
||||
} elseif (!empty($contact[$field])) {
|
||||
return $contact[$field];
|
||||
} elseif (!empty($contact['avatar'])) {
|
||||
$avatar = $contact['avatar'];
|
||||
}
|
||||
|
@ -1713,7 +1713,7 @@ class Contact
|
|||
$condition = ["`nurl` = ? AND ((`uid` = ? AND `network` IN (?, ?)) OR `uid` = ?)",
|
||||
Strings::normaliseLink($url), $uid, Protocol::FEED, Protocol::MAIL, 0];
|
||||
$contact = self::selectFirst(['id', 'updated'], $condition);
|
||||
return self::getAvatarUrlForId($contact['id'] ?? 0, $size, $contact['updated']);
|
||||
return self::getAvatarUrlForId($contact['id'] ?? 0, $size, $contact['updated'] ?? '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue