From e8420dcb7155af7fb8bd29fb63c79367125dd551 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 26 Dec 2022 09:10:55 -0500 Subject: [PATCH] Query expected photo.type field in Protocol\DFRN::relocate - Address first part of https://github.com/friendica/friendica/issues/12488#issuecomment-1364487793 --- src/Protocol/DFRN.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index e29cfcc5ab..52ae12f9c3 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -301,16 +301,15 @@ class DFRN DI::config()->set('system', 'site_pubkey', $res['pubkey']); } - $profilephotos = Photo::selectToArray(['resource-id' , 'scale'], ['profile' => true, 'uid' => $uid], ['order' => ['scale']]); + $profilephotos = Photo::selectToArray(['resource-id', 'scale', 'type'], ['profile' => true, 'uid' => $uid], ['order' => ['scale']]); $photos = []; $ext = Images::supportedTypes(); foreach ($profilephotos as $p) { - $photos[$p['scale']] = DI::baseUrl().'/photo/'.$p['resource-id'].'-'.$p['scale'].'.'.$ext[$p['type']]; + $photos[$p['scale']] = DI::baseUrl() . '/photo/' . $p['resource-id'] . '-' . $p['scale'] . '.' . $ext[$p['type']]; } - $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true;