summaryrefslogtreecommitdiff
path: root/actions/peoplesearch.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/peoplesearch.php')
-rw-r--r--actions/peoplesearch.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php
index adacc0954..4e0ec3f0c 100644
--- a/actions/peoplesearch.php
+++ b/actions/peoplesearch.php
@@ -39,8 +39,13 @@ class PeoplesearchAction extends SearchAction {
# lcase it for comparison
$q = strtolower($q);
- $profile->whereAdd('MATCH(nickname, fullname, location, bio, homepage) ' .
+
+ 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).'\')');
+ }
# Ask for an extra to see if there's more.