From: bbaetz%student.usyd.edu.au <> Date: Tue, 3 Sep 2002 14:24:54 +0000 (+0000) Subject: Bug 161203 - Bug changes with intermediate pages munges fields with X-Git-Tag: bugzilla-2.16.1~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b40d6ac614b96f4edd73f60edb05dda2be9953b7;p=thirdparty%2Fbugzilla.git Bug 161203 - Bug changes with intermediate pages munges fields with multiple values (e.g., CC) original patch by randall_gee_51227124@yahoo.com (Randall M! Gee), r=bbaetz, myk Ported to 2.16 by me, r=preed x2 --- diff --git a/process_bug.cgi b/process_bug.cgi index 5482a1ad23..43c926867f 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -42,7 +42,6 @@ use RelationSet; use vars qw(%versions %components %COOKIE - %MFORM %legal_keywords %legal_opsys %legal_platform @@ -188,6 +187,7 @@ if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct) # a verification form. if (!$vok || !$cok || !$mok || (Param('usebuggroups') && !defined($::FORM{'addtonewgroup'}))) { $vars->{'form'} = \%::FORM; + $vars->{'mform'} = \%::MFORM; if (!$vok || !$cok || !$mok) { $vars->{'verify_fields'} = 1; @@ -344,6 +344,7 @@ sub DuplicateUserConfirm { # ask the duper what he/she wants to do. $vars->{'form'} = \%::FORM; + $vars->{'mform'} = \%::MFORM; $vars->{'original_bug_id'} = $original; $vars->{'duplicate_bug_id'} = $dupe; @@ -885,6 +886,7 @@ foreach my $id (@idlist) { $::FORM{'delta_ts'} = $delta_ts; $vars->{'form'} = \%::FORM; + $vars->{'mform'} = \%::MFORM; $vars->{'bug_id'} = $id; $vars->{'quoteUrls'} = \"eUrls; diff --git a/template/en/default/bug/process/confirm-duplicate.html.tmpl b/template/en/default/bug/process/confirm-duplicate.html.tmpl index 1725719005..abb0f719f1 100644 --- a/template/en/default/bug/process/confirm-duplicate.html.tmpl +++ b/template/en/default/bug/process/confirm-duplicate.html.tmpl @@ -21,6 +21,7 @@ [%# INTERFACE: # form: hash; the form values submitted to the script + # mform: hash; the form multi-values submitted to the script # original_bug_id: number; the bug number for the bug # against which a bug is being duped # duplicate_bug_id: number; the bug number for the bug diff --git a/template/en/default/bug/process/midair.html.tmpl b/template/en/default/bug/process/midair.html.tmpl index a30e89b3ca..21f5f6fb2a 100644 --- a/template/en/default/bug/process/midair.html.tmpl +++ b/template/en/default/bug/process/midair.html.tmpl @@ -21,6 +21,7 @@ [%# INTERFACE: # form: hash; the form values submitted to the script + # mform: hash; the form multi-values submitted to the script # operations: array; bug activity since the user last displayed the bug form, # used by bug/activity/table.html.tmpl to display recent changes that will # be overwritten if the user submits these changes. See that template diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl index 21c5664b88..77a2ab7629 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -21,6 +21,7 @@ [%# INTERFACE: # form: hash; the form values submitted to the script + # mform: hash; the form multi-values submitted to the script # verify_fields: boolean; whether or not to verify # the version, component, and target milestone fields # versions: array; versions for the new product. diff --git a/template/en/default/global/hidden-fields.html.tmpl b/template/en/default/global/hidden-fields.html.tmpl index e622e7b900..f968fab200 100644 --- a/template/en/default/global/hidden-fields.html.tmpl +++ b/template/en/default/global/hidden-fields.html.tmpl @@ -21,6 +21,8 @@ [%# INTERFACE: # form: hash; the form fields/values for which to generate hidden fields. + # mform: hash; the form fields/values with multiple values for which to + # generate hidden fields. # exclude: string; a regular expression matching fields to exclude # from the list of hidden fields generated by this template #%] @@ -28,6 +30,13 @@ [%# Generate hidden form fields for non-excluded fields. %] [% FOREACH field = form %] [% NEXT IF exclude && field.key.search(exclude) %] - + [% IF mform.${field.key}.size > 1 %] + [% FOREACH mvalue = mform.${field.key} %] + + [% END %] + [% ELSE %] + + [% END %] [% END %]