mirror of
https://github.com/friendica/friendica
synced 2025-04-21 22:30:11 +00:00
Fetch photo fields, ensuring that they are filled
This commit is contained in:
parent
74bc3de472
commit
b79bb0d2cb
12 changed files with 82 additions and 32 deletions
|
@ -28,7 +28,6 @@ use Friendica\Core\Renderer;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
||||
/**
|
||||
* This module shows all public friends of the selected contact
|
||||
|
@ -99,7 +98,7 @@ class AllFriends extends BaseModule
|
|||
'url' => Model\Contact::magicLinkbyId($friend['id'], $friend['url']),
|
||||
'itemurl' => ($contactDetails['addr'] ?? '') ?: $friend['url'],
|
||||
'name' => $contactDetails['name'],
|
||||
'thumb' => ProxyUtils::proxifyUrl($contactDetails['thumb'], false, ProxyUtils::SIZE_THUMB),
|
||||
'thumb' => Model\Contact::getThumb($contactDetails),
|
||||
'img_hover' => $contactDetails['name'],
|
||||
'details' => $contactDetails['location'],
|
||||
'tags' => $contactDetails['keywords'],
|
||||
|
|
|
@ -279,8 +279,6 @@ class Contact extends BaseModule
|
|||
if ($contact['network'] == Protocol::PHANTOM) {
|
||||
$contact = false;
|
||||
}
|
||||
|
||||
$contact = ModelContact::checkAvatarCacheByArray($contact);
|
||||
}
|
||||
|
||||
if (DBA::isResult($contact)) {
|
||||
|
@ -318,7 +316,7 @@ class Contact extends BaseModule
|
|||
|
||||
$vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [
|
||||
'$name' => $contact['name'],
|
||||
'$photo' => $contact['photo'],
|
||||
'$photo' => Model\Contact::getPhoto($contact),
|
||||
'$url' => Model\Contact::magicLinkByContact($contact, $contact['url']),
|
||||
'$addr' => $contact['addr'] ?? '',
|
||||
'$network_link' => $network_link,
|
||||
|
@ -614,7 +612,7 @@ class Contact extends BaseModule
|
|||
'$notify' => ['notify', DI::l10n()->t('Notification for new posts'), ($contact['notify_new_posts'] == 1), DI::l10n()->t('Send a notification of every new post of this contact')],
|
||||
'$fetch_further_information' => $fetch_further_information,
|
||||
'$ffi_keyword_denylist' => ['ffi_keyword_denylist', DI::l10n()->t('Keyword Deny List'), $contact['ffi_keyword_denylist'], DI::l10n()->t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
|
||||
'$photo' => $contact['photo'],
|
||||
'$photo' => Model\Contact::getPhoto($contact),
|
||||
'$name' => $contact['name'],
|
||||
'$dir_icon' => $dir_icon,
|
||||
'$sparkle' => $sparkle,
|
||||
|
|
|
@ -27,10 +27,8 @@ use Friendica\Core\Session;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Strings;
|
||||
use Friendica\Util\Proxy;
|
||||
|
||||
/**
|
||||
* Asynchronous HTML fragment provider for frio contact hovercards
|
||||
|
@ -88,7 +86,7 @@ class Hovercard extends BaseModule
|
|||
'name' => $contact['name'],
|
||||
'nick' => $contact['nick'],
|
||||
'addr' => $contact['addr'] ?: $contact['url'],
|
||||
'thumb' => Proxy::proxifyUrl($contact['thumb'], false, Proxy::SIZE_THUMB),
|
||||
'thumb' => Contact::getThumb($contact),
|
||||
'url' => Contact::magicLink($contact['url']),
|
||||
'nurl' => $contact['nurl'],
|
||||
'location' => $contact['location'],
|
||||
|
|
|
@ -32,7 +32,6 @@ use Friendica\DI;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Network\HTTPException;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
||||
|
@ -168,7 +167,7 @@ class Directory extends BaseModule
|
|||
'id' => $contact['id'],
|
||||
'url' => Contact::magicLink($profile_link),
|
||||
'itemurl' => $itemurl,
|
||||
'thumb' => ProxyUtils::proxifyUrl($contact[$photo_size], false, ProxyUtils::SIZE_THUMB),
|
||||
'thumb' => Contact::getThumb($contact),
|
||||
'img_hover' => $contact['name'],
|
||||
'name' => $contact['name'],
|
||||
'details' => $details,
|
||||
|
|
|
@ -32,7 +32,6 @@ use Friendica\DI;
|
|||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
||||
class Contacts extends BaseProfile
|
||||
{
|
||||
|
@ -109,7 +108,7 @@ class Contacts extends BaseProfile
|
|||
'id' => $contact['id'],
|
||||
'img_hover' => DI::l10n()->t('Visit %s\'s profile [%s]', $contact_details['name'], $contact['url']),
|
||||
'photo_menu' => Contact::photoMenu($contact),
|
||||
'thumb' => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB),
|
||||
'thumb' => Contact::getThumb($contact_details),
|
||||
'name' => substr($contact_details['name'], 0, 20),
|
||||
'username' => $contact_details['name'],
|
||||
'details' => $contact_details['location'],
|
||||
|
|
|
@ -294,7 +294,7 @@ class Acl extends BaseModule
|
|||
foreach ($r as $g) {
|
||||
$entry = [
|
||||
'type' => 'c',
|
||||
'photo' => ProxyUtils::proxifyUrl($g['micro'], false, ProxyUtils::SIZE_MICRO),
|
||||
'photo' => Contact::getMicro($g),
|
||||
'name' => htmlspecialchars($g['name']),
|
||||
'id' => intval($g['id']),
|
||||
'network' => $g['network'],
|
||||
|
@ -355,7 +355,7 @@ class Acl extends BaseModule
|
|||
if (count($contact) > 0) {
|
||||
$unknown_contacts[] = [
|
||||
'type' => 'c',
|
||||
'photo' => ProxyUtils::proxifyUrl($contact['micro'], false, ProxyUtils::SIZE_MICRO),
|
||||
'photo' => Contact::getMicro($contact),
|
||||
'name' => htmlspecialchars($contact['name']),
|
||||
'id' => intval($contact['cid']),
|
||||
'network' => $contact['network'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue