add a hook call to acl_lookup()
This commit is contained in:
parent
853b13252a
commit
3dad86f0e0
|
@ -637,22 +637,35 @@ function acl_lookup(&$a, $out_type = 'json') {
|
||||||
$tot += count($unknow_contacts);
|
$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') {
|
if($out_type === 'html') {
|
||||||
$o = array(
|
$o = array(
|
||||||
'tot' => $tot,
|
'tot' => $results["tot"],
|
||||||
'start' => $start,
|
'start' => $results["start"],
|
||||||
'count' => $count,
|
'count' => $results["count"],
|
||||||
'groups' => $groups,
|
'groups' => $results["groups"],
|
||||||
'contacts' => $contacts,
|
'contacts' => $results["contacts"],
|
||||||
);
|
);
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = array(
|
$o = array(
|
||||||
'tot' => $tot,
|
'tot' => $results["tot"],
|
||||||
'start' => $start,
|
'start' => $results["start"],
|
||||||
'count' => $count,
|
'count' => $results["count"],
|
||||||
'items' => $items,
|
'items' => $results["items"],
|
||||||
);
|
);
|
||||||
|
|
||||||
echo json_encode($o);
|
echo json_encode($o);
|
||||||
|
|
Loading…
Reference in a new issue