summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-02 09:43:43 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-02 09:43:43 +0100
commitb8566e4d8f5bc2df8b90c857a99c0f5c0beaebd8 (patch)
tree4b3198d06883cce87cbc07a1ab9eae489aee92c1 /buglist.cgi
parente81b9d51399792035e10c2cd6d1b32f75879c3ec (diff)
downloadbugzilla-b8566e4d8f5bc2df8b90c857a99c0f5c0beaebd8.tar.gz
bugzilla-b8566e4d8f5bc2df8b90c857a99c0f5c0beaebd8.tar.xz
Bug 632718: Only return 500 search results unless the user specifically
requests to see more. r=dkl, a=mkanat
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi11
1 files changed, 11 insertions, 0 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 85162ff56..69c4edaec 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -776,6 +776,14 @@ if ($fulltext and grep { /^relevance/ } @orderstrings) {
$vars->{'message'} = 'buglist_sorted_by_relevance'
}
+# In the HTML interface, by default, we limit the returned results,
+# which speeds up quite a few searches where people are really only looking
+# for the top results.
+if ($format->{'extension'} eq 'html' && !defined $cgi->param('limit')) {
+ $params->param('limit', Bugzilla->params->{'default_search_limit'});
+ $vars->{'default_limited'} = 1;
+}
+
# Generate the basic SQL query that will be used to generate the bug list.
my $search = new Bugzilla::Search('fields' => \@selectcolumns,
'params' => scalar $params->Vars,
@@ -783,6 +791,9 @@ my $search = new Bugzilla::Search('fields' => \@selectcolumns,
my $query = $search->sql;
$vars->{'search_description'} = $search->search_description;
+# We don't want saved searches and other buglist things to save
+# our default limit.
+$params->delete('limit') if $vars->{'default_limited'};
################################################################################
# Query Execution