X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpeoplesearch.php;h=65d970dd159a7fea183763d9fd8488fdde4cb2ab;hb=b4e649fe906a793cd5e62d6390065ea5d41c40db;hp=9e515ade1a9e7b6d21bab32f18e3e9cf44bc5677;hpb=92f9ec1580178e2a2bcc6409f1cd9fba327bce03;p=quix0rs-gnu-social.git diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 9e515ade1a..65d970dd15 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -60,14 +60,8 @@ class PeoplesearchAction extends SearchAction function showResults($q, $page) { - $profile = new Profile(); - - // lcase it for comparison - // $q = strtolower($q); - $search_engine = $profile->getSearchEngine('identica_people'); - $search_engine->set_sort_mode('chron'); // Ask for an extra to see if there's more. $search_engine->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1); @@ -81,14 +75,15 @@ class PeoplesearchAction extends SearchAction $terms = preg_split('/[\s,]+/', $q); $results = new PeopleSearchResults($profile, $terms, $this); $results->show(); + $profile->free(); + $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE, + $page, 'peoplesearch', array('q' => $q)); + } else { - $this->element('p', 'error', _('No results')); + $this->element('p', 'error', _('No results.')); + $this->searchSuggestions($q); + $profile->free(); } - - $profile->free(); - - $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE, - $page, 'peoplesearch', array('q' => $q)); } }