summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authorjocuri%softhome.net <>2004-01-31 09:12:08 +0100
committerjocuri%softhome.net <>2004-01-31 09:12:08 +0100
commit345f9df2f29d90a777051db3d34194ac04b8b637 (patch)
tree7724d113d13b92ecdf8b1cb0c32d5a28703f34b7 /post_bug.cgi
parent5f12f937db422fca2979115059d580ba8a91e6db (diff)
downloadbugzilla-345f9df2f29d90a777051db3d34194ac04b8b637.tar.gz
bugzilla-345f9df2f29d90a777051db3d34194ac04b8b637.tar.xz
Patch for bug 213679: Implement a parameter that allows administrators to control whether blank comments are allowed when filling new bugs; code by Dave Swegen <dswegen@software.plasmon.com>; r=myk; a=myk.
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi4
1 files changed, 4 insertions, 0 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index 315ff3a99..dbc102d3e 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -76,6 +76,10 @@ my $format = GetFormat("bug/create/comment", $::FORM{'format'}, "txt");
$template->process($format->{'template'}, $vars, \$comment)
|| ThrowTemplateError($template->error());
+# Check that if required a description has been provided
+if (Param("commentoncreate") && !trim($::FORM{'comment'})) {
+ ThrowUserError("description_required");
+}
ValidateComment($comment);
my $product = $::FORM{'product'};