summaryrefslogtreecommitdiffstats
path: root/Bugzilla/CGI.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-07-07 13:53:39 +0200
committermkanat%bugzilla.org <>2009-07-07 13:53:39 +0200
commit6a51c4c39e8ced6f808d5517d52c041d9305c2c0 (patch)
treee0eb599bce6c7a64bfcf565a3e09aa345a601d8a /Bugzilla/CGI.pm
parent23ac1fef4768e1d162e8a99cf599684e4cecdc1f (diff)
downloadbugzilla-6a51c4c39e8ced6f808d5517d52c041d9305c2c0.tar.gz
bugzilla-6a51c4c39e8ced6f808d5517d52c041d9305c2c0.tar.xz
Bug 502641: Fix various problems that would occur when you would log in from buglist.cgi
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
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(@_);
}