X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Facl_selectors.php;h=fc3df52327103d6fa56ce18936af685eceb6b4a9;hb=7e6598f2c01dc25b9420309dac1ec84160f21a03;hp=4a35fd0f088070aa13d575047fd1fff1ad5c180c;hpb=30c375d238af79795937b8df046abe9f0ee63db9;p=friendica.git diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 4a35fd0f08..fc3df52327 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -556,7 +556,7 @@ function acl_lookup(&$a, $out_type = 'json') { if($r) { foreach($r as $g) { $contacts[] = array( - "photo" => $g['photo'], + "photo" => proxy_url($g['photo'], false, PROXY_SIZE_MICRO), "name" => $g['name'], "nick" => (x($g['addr']) ? $g['addr'] : $g['url']), "network" => $g['network'], @@ -637,22 +637,35 @@ function acl_lookup(&$a, $out_type = 'json') { $tot += count($unknow_contacts); } + $results = array( + "tot" => $tot, + "start" => $start, + "count" => $count, + "groups" => $groups, + "contacts" => $contacts, + "items" => $items, + "type" => $type, + "search" => $search, + ); + + call_hooks('acl_lookup_end', $results); + if($out_type === 'html') { $o = array( - 'tot' => $tot, - 'start' => $start, - 'count' => $count, - 'groups' => $groups, - 'contacts' => $contacts, + 'tot' => $results["tot"], + 'start' => $results["start"], + 'count' => $results["count"], + 'groups' => $results["groups"], + 'contacts' => $results["contacts"], ); return $o; } $o = array( - 'tot' => $tot, - 'start' => $start, - 'count' => $count, - 'items' => $items, + 'tot' => $results["tot"], + 'start' => $results["start"], + 'count' => $results["count"], + 'items' => $results["items"], ); echo json_encode($o); @@ -663,7 +676,7 @@ function acl_lookup(&$a, $out_type = 'json') { * @brief Searching for global contacts for autocompletion * * @param App $a - * @return array + * @return array with the search results */ function navbar_complete(&$a) { @@ -704,4 +717,4 @@ function navbar_complete(&$a) { } } return; -} \ No newline at end of file +}