Browse Source

Move navbar_complete to Acl

pull/4517/head
Hypolite Petovan 3 years ago
parent
commit
207eac4a16
2 changed files with 6 additions and 7 deletions
  1. +0
    -6
      include/acl_selectors.php
  2. +6
    -1
      mod/acl.php

+ 0
- 6
include/acl_selectors.php View File

@ -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);
}

+ 6
- 1
mod/acl.php View File

@ -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…
Cancel
Save