aboutsummaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-02-11 18:03:50 -0800
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-02-11 18:03:50 -0800
commit99b870afefa80a2fb4b4ac9252d7fdd5f977260d (patch)
treec734ca76dda02abf79e1d91b91ce77fbdefb6390 /buglist.cgi
parentede6518f4e49b26c9096173fcb9ba4197f774874 (diff)
downloadbugs-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.tar
bugs-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.tar.gz
bugs-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.tar.bz2
bugs-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.tar.xz
bugs-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.zip
Bug 535571: Allow Search.pm to accept "limit" and "offset" as parameters.
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi16
1 files changed, 4 insertions, 12 deletions
diff --git a/buglist.cgi b/buglist.cgi
index 3fe2ce39e..4b7fe8f5a 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -772,6 +772,10 @@ if (!$order) {
my @orderstrings = split(/,\s*/, $order);
+if ($fulltext and grep { /^relevance/ } @orderstrings) {
+ $vars->{'message'} = 'buglist_sorted_by_relevance'
+}
+
# 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,
@@ -779,18 +783,6 @@ my $search = new Bugzilla::Search('fields' => \@selectcolumns,
my $query = $search->sql;
$vars->{'search_description'} = $search->search_description;
-if (defined $cgi->param('limit')) {
- my $limit = $cgi->param('limit');
- if (detaint_natural($limit)) {
- $query .= " " . $dbh->sql_limit($limit);
- }
-}
-elsif ($fulltext) {
- if ($cgi->param('order') && $cgi->param('order') =~ /^relevance/) {
- $vars->{'message'} = 'buglist_sorted_by_relevance';
- }
-}
-
################################################################################
# Query Execution