X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnoticesearchrss.php;h=f598d833eb8fd35981616d5d69679ff201629092;hb=74291968c4b4f1fca29cb79caad695a1e2360734;hp=4e206c9a2549ab7b6caab7b29cb5ac747f1ddb89;hpb=8b32942658b179010315450a62b473631a501399;p=quix0rs-gnu-social.git diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index 4e206c9a25..f598d833eb 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -39,8 +39,12 @@ class NoticesearchrssAction extends Rss10Action { # lcase it for comparison $q = strtolower($q); - $notice->whereAdd('MATCH(content) against (\''.addslashes($q).'\')'); - $notice->orderBy('created DESC'); + 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 +}