diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-04-07 11:40:38 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-04-07 11:40:38 -0400 |
commit | 770788d98eb9dfca51e6299e023edab26765c0bf (patch) | |
tree | 17817163962b9c8aaea7dfdbc3cc2ed3cdd7b774 /actions/peoplesearch.php | |
parent | 4cc6d0ea2c7bec551c7726d7a336afea17d27df8 (diff) | |
parent | 17fb51f747c023392cd6127abe9b019e693f0544 (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'actions/peoplesearch.php')
-rw-r--r-- | actions/peoplesearch.php | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 9e515ade1..65d970dd1 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)); } } |