Some standards

This commit is contained in:
Michael 2022-01-15 21:45:08 +00:00
parent 95f085b7ac
commit f68c94db04
5 changed files with 25 additions and 24 deletions

View file

@ -42,15 +42,15 @@ class Lists extends BaseApi
$photos = Photo::selectToArray(['resource-id'], ["`uid` = ? AND NOT `photo-type` IN (?, ?)", $uid, Photo::CONTACT_AVATAR, Photo::CONTACT_BANNER],
['order' => ['id'], 'group_by' => ['resource-id']]);
$data = ['photo' => []];
if (DBA::isResult($photos)) {
foreach ($photos as $photo) {
$element = DI::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']);