mirror of
https://github.com/friendica/friendica
synced 2025-04-23 21:50:10 +00:00
Removal of duplicated photo entries for a contact
This commit is contained in:
parent
3780e51806
commit
47904f99c2
2 changed files with 28 additions and 3 deletions
|
@ -214,7 +214,7 @@ class Photo extends BaseModule
|
|||
If (($contact['uid'] != 0) && empty($contact['photo']) && empty($contact['avatar'])) {
|
||||
$contact = Contact::getByURL($contact['url'], false, ['avatar', 'photo', 'xmpp', 'addr']);
|
||||
}
|
||||
if (!empty($contact['photo'])) {
|
||||
if (!empty($contact['photo']) && !empty($contact['avatar'])) {
|
||||
// Fetch photo directly
|
||||
$resourceid = MPhoto::ridFromURI($contact['photo']);
|
||||
if (!empty($resourceid)) {
|
||||
|
@ -223,7 +223,8 @@ class Photo extends BaseModule
|
|||
return $photo;
|
||||
}
|
||||
}
|
||||
$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'];
|
||||
} elseif ($customsize <= Proxy::PIXEL_MICRO) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue