summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-07-22 05:04:24 +0200
committerlpsolit%gmail.com <>2005-07-22 05:04:24 +0200
commitd0303ab3ecb54eef2ed1b5e55839eada16748416 (patch)
tree3d45f4aaec513824790f8b23983af37b49074563 /post_bug.cgi
parent69ec0a28fd6b83f7001027dbc60ffa6b8e6b27bb (diff)
downloadbugzilla-d0303ab3ecb54eef2ed1b5e55839eada16748416.tar.gz
bugzilla-d0303ab3ecb54eef2ed1b5e55839eada16748416.tar.xz
Bug 301463: Move CheckFormField and CheckFormFieldDefined into Field.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi29
1 files changed, 14 insertions, 15 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 576c4c2c3..f6db24943 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -26,13 +26,12 @@
use strict;
use lib qw(.);
+require "CGI.pl";
use Bugzilla;
use Bugzilla::Constants;
-require "CGI.pl";
-
use Bugzilla::Bug;
-
use Bugzilla::User;
+use Bugzilla::Field;
# Shut up misguided -w warnings about "used only once". For some reason,
# "use vars" chokes on me when I try it here.
@@ -196,18 +195,18 @@ if (!Param('letsubmitterchoosepriority')) {
GetVersionTable();
# Some more sanity checking
-CheckFormField($cgi, 'product', \@::legal_product);
-CheckFormField($cgi, 'rep_platform', \@::legal_platform);
-CheckFormField($cgi, 'bug_severity', \@::legal_severity);
-CheckFormField($cgi, 'priority', \@::legal_priority);
-CheckFormField($cgi, 'op_sys', \@::legal_opsys);
-CheckFormField($cgi, 'bug_status', ['UNCONFIRMED', 'NEW']);
-CheckFormField($cgi, 'version', $::versions{$product});
-CheckFormField($cgi, 'component', $::components{$product});
-CheckFormField($cgi, 'target_milestone', $::target_milestone{$product});
-CheckFormFieldDefined($cgi, 'assigned_to');
-CheckFormFieldDefined($cgi, 'bug_file_loc');
-CheckFormFieldDefined($cgi, 'comment');
+check_form_field($cgi, 'product', \@::legal_product);
+check_form_field($cgi, 'rep_platform', \@::legal_platform);
+check_form_field($cgi, 'bug_severity', \@::legal_severity);
+check_form_field($cgi, 'priority', \@::legal_priority);
+check_form_field($cgi, 'op_sys', \@::legal_opsys);
+check_form_field($cgi, 'bug_status', ['UNCONFIRMED', 'NEW']);
+check_form_field($cgi, 'version', $::versions{$product});
+check_form_field($cgi, 'component', $::components{$product});
+check_form_field($cgi, 'target_milestone', $::target_milestone{$product});
+check_form_field_defined($cgi, 'assigned_to');
+check_form_field_defined($cgi, 'bug_file_loc');
+check_form_field_defined($cgi, 'comment');
my @used_fields;
foreach my $field (@bug_fields) {