diff options
author | bbaetz%student.usyd.edu.au <> | 2002-02-05 09:20:07 +0100 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-02-05 09:20:07 +0100 |
commit | 9612f5b87b1503cdfc56c8170bead7cd47de783e (patch) | |
tree | d73242de3891ed50719cf2308f9aee8098ec1106 /process_bug.cgi | |
parent | 7fa045d01faf68f35814861d4c13ab8a7127c0d4 (diff) | |
download | bugzilla-9612f5b87b1503cdfc56c8170bead7cd47de783e.tar.gz bugzilla-9612f5b87b1503cdfc56c8170bead7cd47de783e.tar.xz |
Bug 119715 - strictvaluechecks should always be enabled
r=justdave, gerv
Diffstat (limited to 'process_bug.cgi')
-rwxr-xr-x | process_bug.cgi | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/process_bug.cgi b/process_bug.cgi index dcde93035..15daf152b 100755 --- a/process_bug.cgi +++ b/process_bug.cgi @@ -102,15 +102,13 @@ PutHeader ("Bug processed"); GetVersionTable(); -if ( Param("strictvaluechecks") ) { - CheckFormFieldDefined(\%::FORM, 'product'); - CheckFormFieldDefined(\%::FORM, 'version'); - CheckFormFieldDefined(\%::FORM, 'component'); +CheckFormFieldDefined(\%::FORM, 'product'); +CheckFormFieldDefined(\%::FORM, 'version'); +CheckFormFieldDefined(\%::FORM, 'component'); - # check if target milestone is defined - matthew@zeroknowledge.com - if ( Param("usetargetmilestone") ) { - CheckFormFieldDefined(\%::FORM, 'target_milestone'); - } +# check if target milestone is defined - matthew@zeroknowledge.com +if ( Param("usetargetmilestone") ) { + CheckFormFieldDefined(\%::FORM, 'target_milestone'); } ConnectToDatabase(); @@ -155,9 +153,7 @@ if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct) || (!$::FORM{'id'} && $::FORM{'product'} ne $::dontchange)) && CheckonComment( "reassignbycomponent" )) { - if ( Param("strictvaluechecks") ) { - CheckFormField(\%::FORM, 'product', \@::legal_product); - } + CheckFormField(\%::FORM, 'product', \@::legal_product); my $prod = $::FORM{'product'}; # note that when this script is called from buglist.cgi (rather @@ -431,7 +427,7 @@ Do you wish to do this?</P> exit; } # end DuplicateUserConfirm() -if (defined $::FORM{'id'} && Param('strictvaluechecks')) { +if (defined $::FORM{'id'}) { # since this means that we were called from show_bug.cgi, now is a good # time to do a whole bunch of error checking that can't easily happen when # we've been called from buglist.cgi, because buglist.cgi only tweaks @@ -668,9 +664,7 @@ if (defined $::FORM{newcc} || defined $::FORM{removecc} || defined $::FORM{massc } -if ( Param('strictvaluechecks') ) { - CheckFormFieldDefined(\%::FORM, 'knob'); -} +CheckFormFieldDefined(\%::FORM, 'knob'); SWITCH: for ($::FORM{'knob'}) { /^none$/ && do { last SWITCH; @@ -707,14 +701,12 @@ SWITCH: for ($::FORM{'knob'}) { } ChangeStatus('NEW'); DoComma(); - if ( Param("strictvaluechecks") ) { - if ( !defined$::FORM{'assigned_to'} || - trim($::FORM{'assigned_to'}) eq "") { - PuntTryAgain("You cannot reassign to a bug to nobody. Unless " . - "you intentionally cleared out the " . - "\"Reassign bug to\" field, " . - Param("browserbugmessage")); - } + if ( !defined$::FORM{'assigned_to'} || + trim($::FORM{'assigned_to'}) eq "") { + PuntTryAgain("You cannot reassign to a bug to nobody. Unless " . + "you intentionally cleared out the " . + "\"Reassign bug to\" field, " . + Param("browserbugmessage")); } my $newid = DBNameToIdAndCheck($::FORM{'assigned_to'}); $::query .= "assigned_to = $newid"; @@ -772,9 +764,7 @@ SWITCH: for ($::FORM{'knob'}) { /^duplicate$/ && CheckonComment( "duplicate" ) && do { ChangeStatus('RESOLVED'); ChangeResolution('DUPLICATE'); - if ( Param('strictvaluechecks') ) { - CheckFormFieldDefined(\%::FORM,'dup_id'); - } + CheckFormFieldDefined(\%::FORM,'dup_id'); my $num = trim($::FORM{'dup_id'}); SendSQL("SELECT bug_id FROM bugs WHERE bug_id = " . SqlQuote($num)); $num = FetchOneColumn(); @@ -1395,9 +1385,7 @@ The changes made were: SendSQL("INSERT INTO cc (who, bug_id) VALUES ($reporter, " . SqlQuote($duplicate) . ")"); } AppendComment($duplicate, $::COOKIE{'Bugzilla_login'}, "*** Bug $::FORM{'id'} has been marked as a duplicate of this bug. ***"); - if ( Param('strictvaluechecks') ) { - CheckFormFieldDefined(\%::FORM,'comment'); - } + CheckFormFieldDefined(\%::FORM,'comment'); SendSQL("INSERT INTO duplicates VALUES ($duplicate, $::FORM{'id'})"); print "<TABLE BORDER=1><TD><H2>Duplicate notation added to bug $duplicate</H2>\n"; system("./processmail", $duplicate, $::COOKIE{'Bugzilla_login'}); |