From: Hypolite Petovan Date: Sun, 28 Jul 2019 03:51:04 +0000 (-0400) Subject: Replace last instance of Contact::select X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b684fffcb7c4715568cc8cbff929ec671edd4871;p=friendica.git Replace last instance of Contact::select --- diff --git a/include/api.php b/include/api.php index bb241039ac..39a61c9838 100644 --- a/include/api.php +++ b/include/api.php @@ -6223,13 +6223,10 @@ function api_friendica_profile_show($type) // select all users from contact table, loop and prepare standard return for user data $users = []; - $nurls = Contact::select(['id', 'nurl'], ['uid' => api_user(), 'profile-id' => $rr['id']]); - - if (DBA::isResult($nurls)) { - foreach ($nurls as $nurl) { - $user = api_get_user($a, $nurl['nurl']); - ($type == "xml") ? $users[$k++ . ":user"] = $user : $users[] = $user; - } + $nurls = Contact::selectToArray(['id', 'nurl'], ['uid' => api_user(), 'profile-id' => $rr['id']]); + foreach ($nurls as $nurl) { + $user = api_get_user($a, $nurl['nurl']); + ($type == "xml") ? $users[$k++ . ":user"] = $user : $users[] = $user; } $profile['users'] = $users;