From ad20ef3dbaf69a5ff589cc88a4fbbd85c1bbf1ae Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 28 Apr 2016 22:15:55 +0200 Subject: [PATCH] add a hook call to acl_lookup() --- include/acl_selectors.php | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 65f125b852..fc3df52327 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -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);