sforkowany z mirror/friendica
Testing the query
rodzic
239bf686af
commit
289923a17c
|
@ -1819,9 +1819,10 @@ function api_statuses_networkpublic_timeline($type)
|
|||
}
|
||||
|
||||
$params = ['order' => ['id' => true], 'limit' => [$start, $count]];
|
||||
// $statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
|
||||
$statuses = Post::select(Item::DISPLAY_FIELDLIST, $condition, $params);
|
||||
|
||||
$statuses = Post::selectForUser(api_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
|
||||
if (empty($statuses)) {
|
||||
return ['test' => $statuses, 'condition' => $condition, 'params' => $params, 'db' => DBA::errorNo(), 'msg' => DBA::errorMessage()];
|
||||
}
|
||||
$ret = api_format_items(Post::toArray($statuses), $user_info, false, $type);
|
||||
|
||||
bindComments($ret);
|
||||
|
|
|
@ -1746,7 +1746,7 @@ class ApiTest extends FixtureTest
|
|||
{
|
||||
$_REQUEST['page'] = -2;
|
||||
$result = api_statuses_networkpublic_timeline('json');
|
||||
self::assertNotEmpty($result['status']);
|
||||
self::assertNotEmpty($result['status'], var_export($result, true));
|
||||
foreach ($result['status'] as $status) {
|
||||
self::assertStatus($status);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue