From 345f9df2f29d90a777051db3d34194ac04b8b637 Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Sat, 31 Jan 2004 08:12:08 +0000 Subject: 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 ; r=myk; a=myk. --- post_bug.cgi | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'post_bug.cgi') 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'}; -- cgit v1.2.3-24-g4f1b