summaryrefslogtreecommitdiff
path: root/actions/peoplesearch.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-07 11:40:38 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-07 11:40:38 -0400
commit770788d98eb9dfca51e6299e023edab26765c0bf (patch)
tree17817163962b9c8aaea7dfdbc3cc2ed3cdd7b774 /actions/peoplesearch.php
parent4cc6d0ea2c7bec551c7726d7a336afea17d27df8 (diff)
parent17fb51f747c023392cd6127abe9b019e693f0544 (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.php19
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));
}
}