summaryrefslogtreecommitdiff
path: root/actions/peoplesearch.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/peoplesearch.php')
-rw-r--r--actions/peoplesearch.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php
index 14177fcf0..65d970dd1 100644
--- a/actions/peoplesearch.php
+++ b/actions/peoplesearch.php
@@ -60,16 +60,10 @@ 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.
+ // Ask for an extra to see if there's more.
$search_engine->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1);
if (false === $search_engine->query($q)) {
$cnt = 0;
@@ -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));
}
}