mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02: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
|
@ -26,8 +26,8 @@ use Friendica\Core\Renderer;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Module;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
function common_content(App $a)
|
||||
|
@ -136,7 +136,7 @@ function common_content(App $a)
|
|||
'url' => Model\Contact::magicLink($common_friend['url']),
|
||||
'itemurl' => ($contact_details['addr'] ?? '') ?: $common_friend['url'],
|
||||
'name' => $contact_details['name'],
|
||||
'thumb' => ProxyUtils::proxifyUrl($contact_details['thumb'], false, ProxyUtils::SIZE_THUMB),
|
||||
'thumb' => Contact::getThumb($contact_details),
|
||||
'img_hover' => $contact_details['name'],
|
||||
'details' => $contact_details['location'],
|
||||
'tags' => $contact_details['keywords'],
|
||||
|
|
|
@ -27,7 +27,6 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
||||
/**
|
||||
* Controller for /match.
|
||||
|
@ -111,7 +110,7 @@ function match_content(App $a)
|
|||
'tags' => $contact_details['keywords'] ?? '',
|
||||
'about' => $contact_details['about'] ?? '',
|
||||
'account_type' => Contact::getAccountType($contact_details),
|
||||
'thumb' => ProxyUtils::proxifyUrl($profile->photo, false, ProxyUtils::SIZE_THUMB),
|
||||
'thumb' => Contact::getThumb($contact_details, $profile->photo),
|
||||
'conntxt' => DI::l10n()->t('Connect'),
|
||||
'connlnk' => $connlnk,
|
||||
'img_hover' => $profile->tags,
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Feature;
|
||||
use Friendica\Content\ForumManager;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Pager;
|
||||
|
@ -29,9 +28,7 @@ use Friendica\Content\Text\HTML;
|
|||
use Friendica\Core\ACL;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -41,7 +38,6 @@ use Friendica\Model\Post\Category;
|
|||
use Friendica\Model\Profile;
|
||||
use Friendica\Module\Security\Login;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
function network_init(App $a)
|
||||
|
@ -587,7 +583,7 @@ function networkThreadedView(App $a, $update, $parent)
|
|||
'id' => 'network',
|
||||
'name' => $contact['name'],
|
||||
'itemurl' => ($contact['addr'] ?? '') ?: $contact['nurl'],
|
||||
'thumb' => ProxyUtils::proxifyUrl($contact['thumb'], false, ProxyUtils::SIZE_THUMB),
|
||||
'thumb' => Contact::getThumb($contact),
|
||||
'details' => $contact['location'],
|
||||
];
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ use Friendica\Model\Verb;
|
|||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Temporal;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
/**
|
||||
|
@ -329,11 +328,7 @@ function ping_init(App $a)
|
|||
if (DBA::isResult($notifs)) {
|
||||
foreach ($notifs as $notif) {
|
||||
$contact = Contact::getByURL($notif['url'], false, ['micro']);
|
||||
if (isset($contact['micro'])) {
|
||||
$notif['photo'] = ProxyUtils::proxifyUrl($contact['micro'], false, ProxyUtils::SIZE_MICRO);
|
||||
} else {
|
||||
$notif['photo'] = ProxyUtils::proxifyUrl($notif['photo'], false, ProxyUtils::SIZE_MICRO);
|
||||
}
|
||||
$notif['photo'] = Contact::getMicro($contact, $notif['photo']);
|
||||
|
||||
$local_time = DateTimeFormat::local($notif['date']);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue