mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
Replace "gcontact" with "contact" - imroved suggestions
This commit is contained in:
parent
7441bd90c8
commit
cc85bc4156
7 changed files with 201 additions and 238 deletions
|
@ -74,22 +74,17 @@ class Acl extends BaseModule
|
|||
$mode = $_REQUEST['smode'];
|
||||
$page = $_REQUEST['page'] ?? 1;
|
||||
|
||||
$r = Search::searchGlobalContact($search, $mode, $page);
|
||||
$result = Search::searchContact($search, $mode, $page);
|
||||
|
||||
$contacts = [];
|
||||
foreach ($r as $g) {
|
||||
if (empty($g['name'])) {
|
||||
DI::logger()->warning('Wrong result item from Search::searchGlobalContact', ['$g' => $g, '$search' => $search, '$mode' => $mode, '$page' => $page]);
|
||||
continue;
|
||||
}
|
||||
$contact = Contact::getByURL($g['url']);
|
||||
foreach ($result as $contact) {
|
||||
$contacts[] = [
|
||||
'photo' => Contact::getMicro($contact, $g['photo']),
|
||||
'name' => htmlspecialchars($contact['name'] ?? $g['name']),
|
||||
'nick' => $contact['nick'] ?? ($g['addr'] ?: $g['url']),
|
||||
'network' => $contact['network'] ?? $g['network'],
|
||||
'link' => $g['url'],
|
||||
'forum' => !empty($g['community']),
|
||||
'photo' => Contact::getMicro($contact),
|
||||
'name' => htmlspecialchars($contact['name']),
|
||||
'nick' => $contact['nick'],
|
||||
'network' => $contact['network'],
|
||||
'link' => $contact['url'],
|
||||
'forum' => $contact['contact-type'] == Contact::TYPE_COMMUNITY,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue