From: Michael Date: Mon, 30 Nov 2020 20:44:21 +0000 (+0000) Subject: Issue 9329: prevent "Expression #1 of SELECT list is not in GROUP BY clause" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ccc07b06de852742eb4c83393416caff954852e7;p=friendica.git Issue 9329: prevent "Expression #1 of SELECT list is not in GROUP BY clause" --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 38c87cf452..99e34abd20 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1296,7 +1296,7 @@ class Contact } 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 { $sql = "`item`.`uid` = ?"; } @@ -1330,8 +1330,7 @@ class Contact $pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage); - $params = ['order' => ['received' => true], 'group_by' => ['uri-id'], - 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]]; + $params = ['order' => ['received' => true], 'limit' => [$pager->getStart(), $pager->getItemsPerPage()]]; if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) { $tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');