Fixing method signature
This commit is contained in:
parent
2bb2bb19fd
commit
5e79d3fc82
2 changed files with 18 additions and 15 deletions
|
@ -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
|
||||||
|
@ -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 a new issue