]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 101056: multiple form values of the same name were not getting correctly...
authorjustdave%syndicomm.com <>
Sat, 13 Oct 2001 04:33:21 +0000 (04:33 +0000)
committerjustdave%syndicomm.com <>
Sat, 13 Oct 2001 04:33:21 +0000 (04:33 +0000)
of a form submit.
Patch by Myk Melez <myk@mozilla.org>
r= gerv, justdave

CGI.pl

diff --git a/CGI.pl b/CGI.pl
index 9beaaa3aa12492e0684e3b951d020235e4087507..f93c0601b508f9524b8c346c9be65edcc3f7f2d2 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -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|