summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-23 07:30:27 +0200
committermkanat%bugzilla.org <>2006-08-23 07:30:27 +0200
commit2de6abfda1e684d218b8d9b251a1153ce30f89e2 (patch)
treeeba27d9ed2512908a2f136a893846aa76b044f5e /post_bug.cgi
parent579565465390391b24027475bbadcbcf3a230111 (diff)
downloadbugzilla-2de6abfda1e684d218b8d9b251a1153ce30f89e2.tar.gz
bugzilla-2de6abfda1e684d218b8d9b251a1153ce30f89e2.tar.xz
Bug 349558: Move validations of global enum fields from post_bug into Bugzilla::Bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi17
1 files changed, 9 insertions, 8 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 33e58f182..ec44f6c48 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -191,15 +191,16 @@ if (!defined $cgi->param('target_milestone')) {
$cgi->param(-name => 'target_milestone', -value => $product->default_milestone);
}
-if (!Bugzilla->params->{'letsubmitterchoosepriority'}) {
- $cgi->param(-name => 'priority', -value => Bugzilla->params->{'defaultpriority'});
-}
-
# Some more sanity checking
-check_field('rep_platform', scalar $cgi->param('rep_platform'));
-check_field('bug_severity', scalar $cgi->param('bug_severity'));
-check_field('priority', scalar $cgi->param('priority'));
-check_field('op_sys', scalar $cgi->param('op_sys'));
+$cgi->param(-name => 'priority', -value => Bugzilla::Bug::_check_priority(
+ $cgi->param('priority')));
+$cgi->param(-name => 'rep_platform',
+ -value => Bugzilla::Bug::_check_rep_platform($cgi->param('rep_platform')));
+$cgi->param(-name => 'bug_severity',
+ -value => Bugzilla::Bug::_check_bug_severity($cgi->param('bug_severity')));
+$cgi->param(-name => 'op_sys', -value => Bugzilla::Bug::_check_op_sys(
+ $cgi->param('op_sys')));
+
check_field('version', scalar $cgi->param('version'),
[map($_->name, @{$product->versions})]);
check_field('target_milestone', scalar $cgi->param('target_milestone'),