mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:40:16 +00:00
mod photos compatibility only_full_group_by
Related to https://github.com/friendica/friendica/pull/3323
This commit is contained in:
parent
792ed55ae6
commit
5b80a1fcaa
1 changed files with 5 additions and 2 deletions
|
@ -1241,7 +1241,8 @@ function photos_content(App $a) {
|
|||
}
|
||||
|
||||
$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(`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),
|
||||
|
@ -1842,7 +1843,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']),
|
||||
|
|
Loading…
Reference in a new issue