mirror of
https://github.com/friendica/friendica
synced 2025-04-19 07:50:12 +00:00
Add order/limit building func and fix reverse order requirement on min_id
This commit is contained in:
parent
9c5f3ae58f
commit
a67fe069e8
2 changed files with 37 additions and 6 deletions
|
@ -57,11 +57,12 @@ class Home extends BaseApi
|
|||
'friendica_order' => TimelineOrderByTypes::ID,
|
||||
], $request);
|
||||
|
||||
$params = ['order' => ['uri-id' => true], 'limit' => $request['limit']];
|
||||
|
||||
|
||||
$condition = ['gravity' => [Item::GRAVITY_PARENT, Item::GRAVITY_COMMENT], 'uid' => $uid];
|
||||
|
||||
$condition = $this->addPagingConditions($request, $condition);
|
||||
$params = $this->buildOrderAndLimitParams($request);
|
||||
|
||||
if ($request['local']) {
|
||||
$condition = DBA::mergeConditions($condition, ["`uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE `origin`)"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue