summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/CGI.pm')
-rw-r--r--Bugzilla/CGI.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm
index 6fb986aa5..1a1a1ac74 100644
--- a/Bugzilla/CGI.pm
+++ b/Bugzilla/CGI.pm
@@ -141,7 +141,7 @@ sub canonicalise_query {
sub clean_search_url {
my $self = shift;
- # Delete any empty URL parameter
+ # Delete any empty URL parameter.
my @cgi_params = $self->param;
foreach my $param (@cgi_params) {
@@ -161,6 +161,9 @@ 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');
+
foreach my $num (1,2) {
# If there's no value in the email field, delete the related fields.
if (!$self->param("email$num")) {
@@ -299,6 +302,17 @@ sub param {
return wantarray ? @result : $result[0];
}
+ # And for various other functions in CGI.pm, we need to correctly
+ # return the URL parameters in addition to the POST parameters when
+ # asked for the list of parameters.
+ elsif (!scalar(@_) && $self->request_method
+ && $self->request_method eq 'POST')
+ {
+ my @post_params = $self->SUPER::param;
+ my @url_params = $self->url_param;
+ my %params = map { $_ => 1 } (@post_params, @url_params);
+ return keys %params;
+ }
return $self->SUPER::param(@_);
}