From 99b870afefa80a2fb4b4ac9252d7fdd5f977260d Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Fri, 11 Feb 2011 18:03:50 -0800 Subject: Bug 535571: Allow Search.pm to accept "limit" and "offset" as parameters. r=mkanat, a=mkanat (module owner) --- buglist.cgi | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'buglist.cgi') 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 -- cgit v1.2.1