Fix for bug 101056: multiple form values of the same name were not getting…

Fix for bug 101056: multiple form values of the same name were not getting correctly stashed if the user had to log in as part of a form submit. Patch by Myk Melez <myk@mozilla.org> r= gerv, justdave
parent f74dbc9d
......@@ -1065,7 +1065,15 @@ Content-type: text/html
# (except for Bugzilla_login and Bugzilla_password which we
# already added as text fields above).
foreach my $i ( grep( $_ !~ /^Bugzilla_/ , keys %::FORM ) ) {
if (scalar(@{$::MFORM{$i}}) > 1) {
# This field has multiple values; add each one separately.
foreach my $val (@{$::MFORM{$i}}) {
print qq|<input type="hidden" name="$i" value="@{[value_quote($val)]}">\n|;
}
} else {
# This field has a single value; add it.
print qq|<input type="hidden" name="$i" value="@{[value_quote($::FORM{$i})]}">\n|;
}
}
print qq|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment