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'],
$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);
* @brief Searching for global contacts for autocompletion
*
* @param App $a
- * @return array
+ * @return array with the search results
*/
function navbar_complete(&$a) {
}
}
return;
-}
\ No newline at end of file
+}