Fix GROUP BY in acl_selector, api, notifier, photos, messages

https://github.com/friendica/friendica/issues/3322
This commit is contained in:
Alexandre Alapetite 2017-04-12 15:11:50 +02:00
parent c3e933642e
commit 74b6d09e89
7 changed files with 14 additions and 12 deletions

View file

@ -502,7 +502,7 @@ function acl_lookup(App $a, $out_type = 'json') {
INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
WHERE NOT `group`.`deleted` AND `group`.`uid` = %d
$sql_extra
GROUP BY `group`.`name`
GROUP BY `group`.`name`, `group`.`id`
ORDER BY `group`.`name`
LIMIT %d,%d",
intval(local_user()),
@ -619,7 +619,7 @@ function acl_lookup(App $a, $out_type = 'json') {
FROM `item` WHERE `parent` = %d
AND (`author-name` LIKE '%%%s%%' OR `author-link` LIKE '%%%s%%')
AND `author-link` NOT IN ('%s')
GROUP BY `author-link`
GROUP BY `author-link`, `author-avatar`, `author-name`
ORDER BY `author-name` ASC
",
intval($conv_id),