mirror of
https://github.com/friendica/friendica
synced 2024-11-18 11:03:42 +00:00
Code standards
This commit is contained in:
parent
c00004f6ea
commit
0e160040d4
1 changed files with 2 additions and 1 deletions
|
@ -43,9 +43,10 @@ class Statuses extends BaseApi
|
||||||
'limit' => 10, // Maximum number of results to return. Defaults to 10.
|
'limit' => 10, // Maximum number of results to return. Defaults to 10.
|
||||||
], $request);
|
], $request);
|
||||||
|
|
||||||
$trending = [];
|
|
||||||
$condition = ["NOT `private` AND `commented` > ?", DateTimeFormat::utc('now -1 day')];
|
$condition = ["NOT `private` AND `commented` > ?", DateTimeFormat::utc('now -1 day')];
|
||||||
$condition = DBA::mergeConditions($condition, ['network' => Protocol::FEDERATED]);
|
$condition = DBA::mergeConditions($condition, ['network' => Protocol::FEDERATED]);
|
||||||
|
|
||||||
|
$trending = [];
|
||||||
$statuses = Post::selectPostThread(['uri-id'], $condition, ['limit' => $request['limit'], 'order' => ['total-comments' => true]]);
|
$statuses = Post::selectPostThread(['uri-id'], $condition, ['limit' => $request['limit'], 'order' => ['total-comments' => true]]);
|
||||||
while ($status = Post::fetch($statuses)) {
|
while ($status = Post::fetch($statuses)) {
|
||||||
$trending[] = DI::mstdnStatus()->createFromUriId($status['uri-id']);
|
$trending[] = DI::mstdnStatus()->createFromUriId($status['uri-id']);
|
||||||
|
|
Loading…
Reference in a new issue