diff options
Diffstat (limited to 'actions/noticesearch.php')
-rw-r--r-- | actions/noticesearch.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php index c257ecec5..7022109e6 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -40,7 +40,12 @@ class NoticesearchAction extends SearchAction { # lcase it for comparison $q = strtolower($q); - $notice->whereAdd('MATCH(content) against (\''.addslashes($q).'\')'); + + if(common_config('db','type')=='mysql') { + $notice->whereAdd('MATCH(content) against (\''.addslashes($q).'\')'); + } else { + $notice->whereAdd('to_tsvector(\'english\', content) @@ plainto_tsquery(\''.addslashes($q).'\')'); + } # Ask for an extra to see if there's more. |