mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07:10:12 +00:00
Merge pull request #12956 from annando/server-blocked
Don't search for contacts on blocked or failed systems
This commit is contained in:
commit
bc7bf77096
8 changed files with 53 additions and 23 deletions
|
@ -79,7 +79,7 @@ class Search
|
|||
$user_data['url'] ?? '',
|
||||
$user_data['photo'] ?? '',
|
||||
$user_data['network'] ?? '',
|
||||
$contactDetails['id'] ?? 0,
|
||||
$contactDetails['cid'] ?? 0,
|
||||
$user_data['id'] ?? 0,
|
||||
$user_data['tags'] ?? ''
|
||||
);
|
||||
|
@ -146,7 +146,7 @@ class Search
|
|||
$profile['photo'] ?? '',
|
||||
Protocol::DFRN,
|
||||
$contactDetails['cid'] ?? 0,
|
||||
0,
|
||||
$contactDetails['zid'] ?? 0,
|
||||
$profile['tags'] ?? ''
|
||||
);
|
||||
|
||||
|
@ -171,7 +171,7 @@ class Search
|
|||
{
|
||||
Logger::info('Searching', ['search' => $search, 'type' => $type, 'start' => $start, 'itempage' => $itemPage]);
|
||||
|
||||
$contacts = Contact::searchByName($search, $type == self::TYPE_FORUM ? 'community' : '');
|
||||
$contacts = Contact::searchByName($search, $type == self::TYPE_FORUM ? 'community' : '', true);
|
||||
|
||||
$resultList = new ResultList($start, $itemPage, count($contacts));
|
||||
|
||||
|
@ -179,12 +179,12 @@ class Search
|
|||
$result = new ContactResult(
|
||||
$contact['name'],
|
||||
$contact['addr'],
|
||||
$contact['addr'],
|
||||
$contact['addr'] ?: $contact['url'],
|
||||
$contact['url'],
|
||||
$contact['photo'],
|
||||
$contact['network'],
|
||||
$contact['cid'] ?? 0,
|
||||
$contact['zid'] ?? 0,
|
||||
0,
|
||||
$contact['pid'],
|
||||
$contact['keywords']
|
||||
);
|
||||
|
||||
|
@ -226,7 +226,7 @@ class Search
|
|||
|
||||
// check if searching in the local global contact table is enabled
|
||||
if (DI::config()->get('system', 'poco_local_search')) {
|
||||
$return = Contact::searchByName($search, $mode);
|
||||
$return = Contact::searchByName($search, $mode, true);
|
||||
} else {
|
||||
$p = $page > 1 ? 'p=' . $page : '';
|
||||
$curlResult = DI::httpClient()->get(self::getGlobalDirectory() . '/search/people?' . $p . '&q=' . urlencode($search), HttpClientAccept::JSON);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue