From a1f68bd592b3a5875dc5512691238f6d3468cd26 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 3 Aug 2005 07:17:45 +0000 Subject: =?UTF-8?q?Bug=20303147:=20Bugzilla=20crashes=20when=20submitting?= =?UTF-8?q?=20a=20bug=20in=20the=20UNCONFIRMED=20state=20using=20PostgreSQ?= =?UTF-8?q?L=20-=20Patch=20by=20Fr=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dmkanat=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- post_bug.cgi | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'post_bug.cgi') diff --git a/post_bug.cgi b/post_bug.cgi index f6db24943..01c0e1845 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -139,7 +139,7 @@ if (!UserInGroup("editbugs") || $cgi->param('assigned_to') eq "") { my @bug_fields = ("version", "rep_platform", "bug_severity", "priority", "op_sys", "assigned_to", - "bug_status", "bug_file_loc", "short_desc", + "bug_status", "everconfirmed", "bug_file_loc", "short_desc", "target_milestone", "status_whiteboard"); if (Param("usebugaliases")) { @@ -208,6 +208,9 @@ check_form_field_defined($cgi, 'assigned_to'); check_form_field_defined($cgi, 'bug_file_loc'); check_form_field_defined($cgi, 'comment'); +my $everconfirmed = ($cgi->param('bug_status') eq 'UNCONFIRMED') ? 0 : 1; +$cgi->param(-name => 'everconfirmed', -value => $everconfirmed); + my @used_fields; foreach my $field (@bug_fields) { if (defined $cgi->param($field)) { @@ -215,13 +218,6 @@ foreach my $field (@bug_fields) { } } -if (defined $cgi->param('bug_status') - && $cgi->param('bug_status') ne 'UNCONFIRMED') -{ - push(@used_fields, "everconfirmed"); - $cgi->param(-name => 'everconfirmed', -value => 1); -} - $cgi->param(-name => 'product_id', -value => $product_id); push(@used_fields, "product_id"); $cgi->param(-name => 'component_id', -value => $component_id); -- cgit v1.2.1