From a806b298f5bfe5914f27a1419d27366fe59da449 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 9 Sep 2006 06:11:40 +0000 Subject: Bug 287326: Ability to add custom single-select fields to a bug - Patch by Frédéric Buclin and Max Kanat-Alexander r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process_bug.cgi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'process_bug.cgi') diff --git a/process_bug.cgi b/process_bug.cgi index bc49ce01f..4ca02b17b 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -775,14 +775,16 @@ foreach my $field ("rep_platform", "priority", "bug_severity", } # Add custom fields data to the query that will update the database. -foreach my $field (Bugzilla->custom_field_names) { - if (defined $cgi->param($field) +foreach my $field (Bugzilla->get_fields({custom => 1, obsolete => 0})) { + my $fname = $field->name; + if (defined $cgi->param($fname) && (!$cgi->param('dontchange') - || $cgi->param($field) ne $cgi->param('dontchange'))) + || $cgi->param($fname) ne $cgi->param('dontchange'))) { DoComma(); - $::query .= "$field = ?"; - my $value = $cgi->param($field); + $::query .= "$fname = ?"; + my $value = $cgi->param($fname); + check_field($fname, $value) if ($field->type == FIELD_TYPE_SINGLE_SELECT); trick_taint($value); push(@values, $value); } -- cgit v1.2.3-24-g4f1b