Use dba::inArray() instead of dba::fetch() in api_search

This commit is contained in:
Pierre Rudloff 2017-12-18 14:28:04 +01:00
parent ee8468affe
commit 31d63d929d

View file

@ -1535,12 +1535,7 @@ function api_search($type)
intval($since_id) intval($since_id)
); );
$statuses = array(); $data['status'] = api_format_items(dba::inArray($r), api_get_user(get_app()));
while ($row = dba::fetch($r)) {
$statuses[] = $row;
}
$data['status'] = api_format_items($statuses, api_get_user(get_app()));
return api_format_data("statuses", $type, $data); return api_format_data("statuses", $type, $data);
} }