Fixing method signature
This commit is contained in:
parent
2bb2bb19fd
commit
5e79d3fc82
|
@ -75,6 +75,7 @@ class Search extends BaseObject
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search in the global directory for occurrences of the search string
|
* Search in the global directory for occurrences of the search string
|
||||||
|
*
|
||||||
* @see https://github.com/friendica/friendica-directory/blob/master/docs/Protocol.md#search
|
* @see https://github.com/friendica/friendica-directory/blob/master/docs/Protocol.md#search
|
||||||
*
|
*
|
||||||
* @param string $search
|
* @param string $search
|
||||||
|
@ -106,7 +107,7 @@ class Search extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$red = 0;
|
$red = 0;
|
||||||
$resultJson = Network::fetchUrl($searchUrl, false,$red, 0, 'application/json');
|
$resultJson = Network::fetchUrl($searchUrl, false, $red, 0, 'application/json');
|
||||||
|
|
||||||
$results = json_decode($resultJson, true);
|
$results = json_decode($resultJson, true);
|
||||||
|
|
||||||
|
@ -120,7 +121,9 @@ class Search extends BaseObject
|
||||||
|
|
||||||
foreach ($profiles as $profile) {
|
foreach ($profiles as $profile) {
|
||||||
$contactDetails = Contact::getDetailsByURL(defaults($profile, 'profile_url', ''), local_user());
|
$contactDetails = Contact::getDetailsByURL(defaults($profile, 'profile_url', ''), local_user());
|
||||||
$itemUrl = (!empty($contactDetails['addr']) ? $contactDetails['addr'] : defaults($profile, 'profile_url', ''));
|
$itemUrl = (!empty($contactDetails['addr']) ?
|
||||||
|
$contactDetails['addr'] :
|
||||||
|
defaults($profile, 'profile_url', ''));
|
||||||
|
|
||||||
$result = new ContactResult(
|
$result = new ContactResult(
|
||||||
defaults($profile, 'name', ''),
|
defaults($profile, 'name', ''),
|
||||||
|
|
|
@ -66,7 +66,7 @@ class BaseSearchModule extends BaseModule
|
||||||
$results = Search::getContactsFromLocalDirectory($search, $type, $pager->getStart(), $pager->getItemsPerPage());
|
$results = Search::getContactsFromLocalDirectory($search, $type, $pager->getStart(), $pager->getItemsPerPage());
|
||||||
|
|
||||||
} elseif (strlen($config->get('system', 'directory')) && empty($results)) {
|
} elseif (strlen($config->get('system', 'directory')) && empty($results)) {
|
||||||
$results = Search::getContactsFromGlobalDirectory($search, $pager->getPage(), $type);
|
$results = Search::getContactsFromGlobalDirectory($search, $type, $pager->getPage());
|
||||||
$pager->setItemsPerPage($results->getItemsPage());
|
$pager->setItemsPerPage($results->getItemsPage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user