]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Module/Api/Friendica/Photoalbum/Show.php
authorHank G <hankgrabowski@gmail.com>
Tue, 13 Dec 2022 21:46:16 +0000 (16:46 -0500)
committerGitHub <noreply@github.com>
Tue, 13 Dec 2022 21:46:16 +0000 (16:46 -0500)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Module/Api/Friendica/Photoalbum/Show.php

index 485b3e91e74daaa898c23831e5da61b67a57b35c..14f561a990fe16097cb3f3dc532ad88d016441eb 100644 (file)
@@ -90,20 +90,18 @@ class Show extends BaseApi
                $photos = Photo::selectToArray(['resource-id'], $condition, $params);
 
                $data = ['photo' => []];
-               if (DBA::isResult($photos)) {
-                       foreach ($photos as $photo) {
-                               $element = $this->friendicaPhoto->createFromId($photo['resource-id'], null, $uid, 'json', false);
-
-                               $element['thumb'] = end($element['link']);
-                               unset($element['link']);
-
-                               if ($type == 'xml') {
-                                       $thumb = $element['thumb'];
-                                       unset($element['thumb']);
-                                       $data['photo'][] = ['@attributes' => $element, '1' => $thumb];
-                               } else {
-                                       $data['photo'][] = $element;
-                               }
+               foreach ($photos as $photo) {
+                       $element = $this->friendicaPhoto->createFromId($photo['resource-id'], null, $uid, 'json', false);
+
+                       $element['thumb'] = end($element['link']);
+                       unset($element['link']);
+
+                       if ($type == 'xml') {
+                               $thumb = $element['thumb'];
+                               unset($element['thumb']);
+                               $data['photo'][] = ['@attributes' => $element, '1' => $thumb];
+                       } else {
+                               $data['photo'][] = $element;
                        }
                }