mirror of
https://github.com/friendica/friendica
synced 2025-04-22 11:10:11 +00:00
Use the id instead of iid
This commit is contained in:
parent
859d026edf
commit
0cd8c78e2d
2 changed files with 9 additions and 3 deletions
|
@ -1810,15 +1810,15 @@ function api_statuses_networkpublic_timeline($type)
|
|||
|
||||
$start = max(0, ($page - 1) * $count);
|
||||
|
||||
$condition = ["`uid` = 0 AND `gravity` IN (?, ?) AND `iid` > ? AND `private` = ?",
|
||||
$condition = ["`uid` = 0 AND `gravity` IN (?, ?) AND `id` > ? AND `private` = ?",
|
||||
GRAVITY_PARENT, GRAVITY_COMMENT, $since_id, Item::PUBLIC];
|
||||
|
||||
if ($max_id > 0) {
|
||||
$condition[0] .= " AND `iid` <= ?";
|
||||
$condition[0] .= " AND `id` <= ?";
|
||||
$condition[] = $max_id;
|
||||
}
|
||||
|
||||
$params = ['order' => ['iid' => true], 'limit' => [$start, $count]];
|
||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
$statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
|
||||
|
||||
$ret = api_format_items(Post::toArray($statuses), $user_info, false, $type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue