From: Hank G Date: Tue, 13 Dec 2022 21:46:16 +0000 (-0500) Subject: Update src/Module/Api/Friendica/Photoalbum/Show.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6af4bfae21f00b11a5ae8a91b6a5c6990f84f7b4;p=friendica.git Update src/Module/Api/Friendica/Photoalbum/Show.php Co-authored-by: Hypolite Petovan --- diff --git a/src/Module/Api/Friendica/Photoalbum/Show.php b/src/Module/Api/Friendica/Photoalbum/Show.php index 485b3e91e7..14f561a990 100644 --- a/src/Module/Api/Friendica/Photoalbum/Show.php +++ b/src/Module/Api/Friendica/Photoalbum/Show.php @@ -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; } }