]> git.mxchange.org Git - friendica.git/commitdiff
Query expected photo.type field in Protocol\DFRN::relocate
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 26 Dec 2022 14:10:55 +0000 (09:10 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 26 Dec 2022 14:10:55 +0000 (09:10 -0500)
- Address first part of https://github.com/friendica/friendica/issues/12488#issuecomment-1364487793

src/Protocol/DFRN.php

index e29cfcc5ab38c7cd29989179c53da31cc0e0489e..52ae12f9c3f5a708f73d3370469e580c025e41cd 100644 (file)
@@ -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;