summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-02-01 21:46:42 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-01 21:46:42 +0100
commit26426fe87683c76702a2340bf852e8bb0eca7626 (patch)
tree4f683c215ee1e65dd1c24ba4fb460031030e5ba4 /Bugzilla/CGI.pm
parentad31a5706aed1cee3fa5c54733b1244a86042c7f (diff)
downloadbugzilla-26426fe87683c76702a2340bf852e8bb0eca7626.tar.gz
bugzilla-26426fe87683c76702a2340bf852e8bb0eca7626.tar.xz
Bug 537746: Search criteria headers on buglist duplicate unnecessarily when bugidtype is in use
Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 8a0e2efe9..6e9dfd0ce 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -110,6 +110,7 @@ sub new {
sub canonicalise_query {
my ($self, @exclude) = @_;
+ $self->convert_old_params();
# Reconstruct the URL by concatenating the sorted param=value pairs
my @parameters;
foreach my $key (sort($self->param())) {
@@ -134,6 +135,17 @@ sub canonicalise_query {
return join("&", @parameters);
}
+sub convert_old_params {
+ my $self = shift;
+
+ # bugidtype is now bug_id_type.
+ if ($self->param('bugidtype')) {
+ my $value = $self->param('bugidtype') eq 'exclude' ? 'nowords' : 'anyexact';
+ $self->param('bug_id_type', $value);
+ $self->delete('bugidtype');
+ }
+}
+
sub clean_search_url {
my $self = shift;
# Delete any empty URL parameter.
@@ -153,9 +165,6 @@ sub clean_search_url {
}
}
- # Delete certain parameters if the associated parameter is empty.
- $self->delete('bugidtype') if !$self->param('bug_id');
-
# Delete leftovers from the login form
$self->delete('Bugzilla_remember', 'GoAheadAndLogIn');