Move navbar_complete to Acl
This commit is contained in:
parent
824262b824
commit
207eac4a16
2 changed files with 6 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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[] = [
|
||||
|
|
Loading…
Reference in a new issue