diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-02-11 18:03:50 -0800 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2011-02-11 18:03:50 -0800 |
commit | 99b870afefa80a2fb4b4ac9252d7fdd5f977260d (patch) | |
tree | c734ca76dda02abf79e1d91b91ce77fbdefb6390 /buglist.cgi | |
parent | Bug 630800: Require a newer version of URI.pm to correctly parse URLs that (diff) | |
download | bugzilla-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.tar.gz bugzilla-99b870afefa80a2fb4b4ac9252d7fdd5f977260d.tar.bz2 bugzilla-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-x | buglist.cgi | 16 |
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 |