Merge pull request #9615 from annando/issue-9329
Issue 9329: prevent "Expression #1 of SELECT list is not in GROUP BY clause"
This commit is contained in:
commit
9636ffe27d
1 changed files with 2 additions and 3 deletions
|
@ -1296,7 +1296,7 @@ class Contact
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($contact["network"]) || in_array($contact["network"], Protocol::FEDERATED)) {
|
if (empty($contact["network"]) || in_array($contact["network"], Protocol::FEDERATED)) {
|
||||||
$sql = "`item`.`uid` IN (0, ?)";
|
$sql = "(`item`.`uid` = 0 OR (`item`.`uid` = ? AND NOT `item`.`global`))";
|
||||||
} else {
|
} else {
|
||||||
$sql = "`item`.`uid` = ?";
|
$sql = "`item`.`uid` = ?";
|
||||||
}
|
}
|
||||||
|
@ -1330,8 +1330,7 @@ class Contact
|
||||||
|
|
||||||
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage);
|
$pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage);
|
||||||
|
|
||||||
$params = ['order' => ['received' => true], 'group_by' => ['uri-id'],
|
$params = ['order' => ['received' => true], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||||
'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
|
||||||
|
|
||||||
if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) {
|
if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) {
|
||||||
$tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');
|
$tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');
|
||||||
|
|
Loading…
Reference in a new issue