X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=bf21b3437a3d625c9c388a5921dd5146cc37e088;hb=696404739bdd3db8eae4255c2d622de8a45df18d;hp=ddf08146757754a90679ed7a10f9ee70dca665ce;hpb=49527b70d34cfc899b8ba1a3876a14bb11ed9e8a;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index ddf0814675..bf21b3437a 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1,4 +1,9 @@ data,'user')) { notice( t('No photos selected') . EOL ); @@ -1240,7 +1242,10 @@ function photos_content(App $a) { $order = 'DESC'; } - $r = q("SELECT `resource-id`, `id`, `filename`, type, max(`scale`) AS `scale`, `desc` FROM `photo` WHERE `uid` = %d AND `album` = '%s' + $r = q("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`, + ANY_VALUE(`type`) AS `type`, max(`scale`) AS `scale`, ANY_VALUE(`desc`) as `desc`, + ANY_VALUE(`created`) as `created` + FROM `photo` WHERE `uid` = %d AND `album` = '%s' AND `scale` <= 4 $sql_extra GROUP BY `resource-id` ORDER BY `created` $order LIMIT %d , %d", intval($owner_uid), dbesc($album), @@ -1581,9 +1586,9 @@ function photos_content(App $a) { '$album' => array('albname', t('New album name'), $album_e,''), '$caption' => array('desc', t('Caption'), $caption_e, ''), '$tags' => array('newtag', t('Add a Tag'), "", t('Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping')), - '$rotate_none' => array('rotate',t('Do not rotate'),0,'', true), - '$rotate_cw' => array('rotate',t('Rotate CW (right)'),1,''), - '$rotate_ccw' => array('rotate',t('Rotate CCW (left)'),2,''), + '$rotate_none' => array('rotate', t('Do not rotate'),0,'', true), + '$rotate_cw' => array('rotate', t('Rotate CW (right)'),1,''), + '$rotate_ccw' => array('rotate', t('Rotate CCW (left)'),2,''), '$nickname' => $a->data['user']['nickname'], '$resource_id' => $ph[0]['resource-id'], @@ -1840,7 +1845,9 @@ function photos_content(App $a) { $a->set_pager_itemspage(20); } - $r = qu("SELECT `resource-id`, `id`, `filename`, type, `album`, max(`scale`) AS `scale` FROM `photo` + $r = qu("SELECT `resource-id`, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`filename`) AS `filename`, + ANY_VALUE(`type`) AS `type`, ANY_VALUE(`album`) AS `album`, max(`scale`) AS `scale`, + ANY_VALUE(`created`) AS `created` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra GROUP BY `resource-id` ORDER BY `created` DESC LIMIT %d , %d", intval($a->data['user']['uid']),