summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi9
1 files changed, 9 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 4beb57a09..bff5e75e0 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -619,6 +619,15 @@ if ($db_order =~ /bugs.target_milestone/) {
$query =~ s/\sWHERE\s/ LEFT JOIN milestones ms_order ON ms_order.value = bugs.target_milestone AND ms_order.product_id = bugs.product_id WHERE /;
}
+# Even more disgusting hack: if we are doing a full text search,
+# order by relevance instead of anything else, and limit to 200 results.
+if ($search->{'sorted_by_relevance'}) {
+ $db_order = $order = "relevance DESC LIMIT 200";
+ $vars->{'sorted_by_relevance'} = 1;
+}
+
+
+
$query .= " ORDER BY $db_order " if ($order);