X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseSearchModule.php;h=ed39f071ca61c92c898aa1a702ccd638f04cfbf2;hb=4d8ca5c9c212153c4f892d7b67a2e52a741d7f4d;hp=226a4da4d58661724c63ce79cd9aaf8ff89d186a;hpb=862159c712b3835a43eb2c380dde6e812f07a42b;p=friendica.git diff --git a/src/Module/BaseSearchModule.php b/src/Module/BaseSearchModule.php index 226a4da4d5..ed39f071ca 100644 --- a/src/Module/BaseSearchModule.php +++ b/src/Module/BaseSearchModule.php @@ -50,7 +50,10 @@ class BaseSearchModule extends BaseModule $search = substr($search, 1); $type = Search::TYPE_PEOPLE; $header = L10n::t('People Search - %s', $search); - $results = Search::getContactsFromProbe($search); + + if (strrpos($search, '@') > 0) { + $results = Search::getContactsFromProbe($search); + } } if (strpos($search, '!') === 0) { @@ -64,7 +67,6 @@ class BaseSearchModule extends BaseModule if ($localSearch && empty($results)) { $pager->setItemsPerPage(80); $results = Search::getContactsFromLocalDirectory($search, $type, $pager->getStart(), $pager->getItemsPerPage()); - } elseif (strlen($config->get('system', 'directory')) && empty($results)) { $results = Search::getContactsFromGlobalDirectory($search, $type, $pager->getPage()); $pager->setItemsPerPage($results->getItemsPage()); @@ -86,8 +88,8 @@ class BaseSearchModule extends BaseModule */ protected static function printResult(ResultList $results, Pager $pager, $header = '') { - if (empty($results) || empty($results->getResults())) { - info(L10n::t('No matches') . EOL); + if ($results->getTotal() == 0) { + info(L10n::t('No matches')); return ''; }