Issue 9923: Fix DB Error 1055
This commit is contained in:
parent
891fb42a23
commit
6c90005363
1 changed files with 4 additions and 2 deletions
|
@ -170,8 +170,10 @@ class Index extends BaseSearch
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($uriids)) {
|
if (!empty($uriids)) {
|
||||||
$params = ['order' => ['id' => true], 'group_by' => ['uri-id']];
|
$condition = ["(`uid` = ? OR (`uid` = ? AND NOT `global`))", 0, local_user()];
|
||||||
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, ['uri-id' => $uriids], $params));
|
$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)) {
|
if (empty($items)) {
|
||||||
|
|
Loading…
Reference in a new issue