diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 2c9770f9b..e6d1a8a92 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 e325e4668..a178a6922 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[] = [