summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-11-13 12:07:57 +0100
committermkanat%bugzilla.org <>2006-11-13 12:07:57 +0100
commit49838aefe6590fd9a5474853beb5c7d937029534 (patch)
tree529998634ff356eb7679a7d7f3da976f94a2cc65 /Bugzilla/CGI.pm
parenta3ae4ab4b3dacb799e7e370c4785a64e9f4596af (diff)
downloadbugzilla-49838aefe6590fd9a5474853beb5c7d937029534.tar.gz
bugzilla-49838aefe6590fd9a5474853beb5c7d937029534.tar.xz
Bug 360028: Bugzilla::Search::Saved should have create() and update(), and buglist.cgi should use it
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm25
1 files changed, 25 insertions, 0 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 091362306..7b76f6af0 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -135,6 +135,31 @@ sub canonicalise_query {
return join("&", @parameters);
}
+sub clean_search_url {
+ my $self = shift;
+ # Delete any empty URL parameter
+ my @cgi_params = $self->param;
+
+ foreach my $param (@cgi_params) {
+ if (defined $self->param($param) && $self->param($param) eq '') {
+ $self->delete($param);
+ $self->delete("${param}_type");
+ }
+
+ # Boolean Chart stuff is empty if it's "noop"
+ if ($param =~ /\d-\d-\d/ && defined $self->param($param)
+ && $self->param($param) eq 'noop')
+ {
+ $self->delete($param);
+ }
+ }
+
+ # Delete certain parameters if the associated parameter is empty.
+ $self->delete('bugidtype') if !$self->param('bug_id');
+ $self->delete('emailtype1') if !$self->param('email1');
+ $self->delete('emailtype2') if !$self->param('email2');
+}
+
# Overwrite to ensure nph doesn't get set, and unset HEADERS_ONCE
sub multipart_init {
my $self = shift;