]> git.mxchange.org Git - friendica.git/commitdiff
Use dba::inArray() instead of dba::fetch() in api_search
authorPierre Rudloff <contact@rudloff.pro>
Mon, 18 Dec 2017 13:28:04 +0000 (14:28 +0100)
committerPierre Rudloff <contact@rudloff.pro>
Mon, 18 Dec 2017 13:28:04 +0000 (14:28 +0100)
include/api.php

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