summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/peoplesearch.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php
index 6b03169a0..d493c7667 100644
--- a/actions/peoplesearch.php
+++ b/actions/peoplesearch.php
@@ -40,16 +40,12 @@ class PeoplesearchAction extends SearchAction {
# lcase it for comparison
$q = strtolower($q);
- if(common_config('db','type')=='mysql') {
- $profile->whereAdd('MATCH(nickname, fullname, location, bio, homepage) ' .
- 'against (\''.addslashes($q).'\')');
- } else {
- $profile->whereAdd('textsearch @@ plainto_tsquery(\''.addslashes($q).'\')');
- }
+ $search_engine = $profile->getSearchEngine();
- # Ask for an extra to see if there's more.
+ $search_engine->query($q);
- $profile->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1);
+ # Ask for an extra to see if there's more.
+ $search_engine->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1);
$cnt = $profile->find();