summaryrefslogtreecommitdiff
path: root/actions/peoplesearch.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
commite5657ca4bbd8a43bf2dd44c2554e807a45224bd7 (patch)
tree3ad9a722f787e277ab571d40522cd5289da738dc /actions/peoplesearch.php
parente632f3be6f48c187b8049f35756b25ae80be2f0b (diff)
parent070cd3533c3474dc065c6681befb92dac51f4bf7 (diff)
Merge branch '0.7.x' into 0.8.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));
}
}