summaryrefslogtreecommitdiff
path: root/actions/peoplesearch.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-07 17:14:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-07 17:14:23 -0400
commit4e3e4fcfff53ea3a5ef5c90672f3848596d3acbf (patch)
treebe91ddb09b757813f983f40cb2b239eb931186fd /actions/peoplesearch.php
parent5953d56fe2db5cf610cd13e3806d5596964592cf (diff)
parent92d18134bfe082f75211b3baa93f20d88367dba6 (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));
}
}