1
0
Fork 0

Query expected photo.type field in Protocol\DFRN::relocate

- Address first part of https://github.com/friendica/friendica/issues/12488#issuecomment-1364487793
This commit is contained in:
Hypolite Petovan 2022-12-26 09:10:55 -05:00
parent 1babd93c15
commit e8420dcb71

View file

@ -301,16 +301,15 @@ class DFRN
DI::config()->set('system', 'site_pubkey', $res['pubkey']); 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 = []; $photos = [];
$ext = Images::supportedTypes(); $ext = Images::supportedTypes();
foreach ($profilephotos as $p) { 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 = new DOMDocument('1.0', 'utf-8');
$doc->formatOutput = true; $doc->formatOutput = true;