summaryrefslogtreecommitdiff
path: root/actions/noticesearchrss.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/noticesearchrss.php')
-rw-r--r--actions/noticesearchrss.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php
index c9d08ce8e..f598d833e 100644
--- a/actions/noticesearchrss.php
+++ b/actions/noticesearchrss.php
@@ -39,7 +39,11 @@ class NoticesearchrssAction extends Rss10Action {
# 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).'\')');
+ }
$notice->orderBy('created DESC, notice.id DESC');
# Ask for an extra to see if there's more.
@@ -70,4 +74,4 @@ class NoticesearchrssAction extends Rss10Action {
function get_image() {
return NULL;
}
-} \ No newline at end of file
+}