Issue 9923: Fix DB Error 1055

This commit is contained in:
Michael 2021-05-29 21:28:40 +00:00
parent 891fb42a23
commit 6c90005363

View File

@ -170,8 +170,10 @@ class Index extends BaseSearch
}
if (!empty($uriids)) {
$params = ['order' => ['id' => true], 'group_by' => ['uri-id']];
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, ['uri-id' => $uriids], $params));
$condition = ["(`uid` = ? OR (`uid` = ? AND NOT `global`))", 0, local_user()];
$condition = DBA::mergeConditions($condition, ['uri-id' => $uriids]);
$params = ['order' => ['id' => true]];
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, $condition, $params));
}
if (empty($items)) {