]> git.mxchange.org Git - friendica.git/commitdiff
add a hook call to acl_lookup()
authorrabuzarus <>
Thu, 28 Apr 2016 20:15:55 +0000 (22:15 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 1 May 2016 11:49:58 +0000 (13:49 +0200)
include/acl_selectors.php

index 65f125b852e69a4668e124225ecc103c4f63d4c7..fc3df52327103d6fa56ce18936af685eceb6b4a9 100644 (file)
@@ -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);