mirror of
https://github.com/friendica/friendica
synced 2025-04-23 13:10:16 +00:00
Improving test data
This commit is contained in:
parent
bc6d87afa8
commit
15b709594f
2 changed files with 66 additions and 8 deletions
|
@ -1819,15 +1819,10 @@ function api_statuses_networkpublic_timeline($type)
|
|||
}
|
||||
|
||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
// $statuses = Post::toArray(Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params));
|
||||
$statuses = Post::toArray(Post::select(Item::DISPLAY_FIELDLIST, $condition, $params));
|
||||
if (empty($statuses)) {
|
||||
return ['status' => [], 'statuses2' => $statuses, 'condition' => $condition, 'params' => $params, 'db' => DBA::errorNo(), 'msg' => DBA::errorMessage()];
|
||||
}
|
||||
$statuses = Post::toArray(Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params));
|
||||
|
||||
$ret = api_format_items($statuses, $user_info, false, $type);
|
||||
if (empty($ret)) {
|
||||
return ['status' => [], 'ret' => $ret, 'statuses' => $statuses, 'condition' => $condition, 'params' => $params, 'db' => DBA::errorNo(), 'msg' => DBA::errorMessage()];
|
||||
}
|
||||
|
||||
bindComments($ret);
|
||||
|
||||
$data = ['status' => $ret];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue