From 207eac4a1694e41a0f80a867d2af4bfdecbc0fb0 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 25 Feb 2018 20:04:30 -0500 Subject: [PATCH] Move navbar_complete to Acl --- include/acl_selectors.php | 6 ------ mod/acl.php | 7 ++++++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 2c9770f9bd..e6d1a8a92e 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -9,9 +9,3 @@ use Friendica\Model\Contact; require_once "mod/proxy.php"; -function navbar_complete(App $a) { - $search = notags(trim($_REQUEST['search'])); - $mode = $_REQUEST['smode']; - - return Acl::contactAutocomplete($search, $mode); -} diff --git a/mod/acl.php b/mod/acl.php index e325e4668d..a178a69221 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -4,6 +4,7 @@ use Friendica\App; use Friendica\Content\Widget; +use Friendica\Core\Acl; use Friendica\Core\Addon; use Friendica\Database\DBM; use Friendica\Model\Contact; @@ -184,7 +185,11 @@ function acl_content(App $a) ); } elseif ($type == 'x') { // autocomplete for global contact search (e.g. navbar search) - $r = navbar_complete($a); + $search = notags(trim($_REQUEST['search'])); + $mode = $_REQUEST['smode']; + + $r = Acl::contactAutocomplete($search, $mode); + $contacts = []; foreach ($r as $g) { $contacts[] = [