From: gerv%gerv.net <> Date: Mon, 29 Apr 2002 05:05:31 +0000 (+0000) Subject: Bug 138904 - post_bug templates should be separate. Patch by gerv, 2xr=myk. X-Git-Tag: bugzilla-2.16rc1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b84667020e4ae64f0a9c9a374999f1e97060a133;p=thirdparty%2Fbugzilla.git Bug 138904 - post_bug templates should be separate. Patch by gerv, 2xr=myk. --- diff --git a/post_bug.cgi b/post_bug.cgi index 1434921308..b6f7f5268b 100755 --- a/post_bug.cgi +++ b/post_bug.cgi @@ -58,7 +58,11 @@ my $comment; $vars->{'form'} = \%::FORM; -$template->process("bug/create/initial-comment.txt.tmpl", $vars, \$comment) +# We can't use ValidateOutputFormat here because it defaults to HTML. +my $template_name = "bug/create/comment"; +$template_name .= ($::FORM{'format'} ? "-$::FORM{'format'}" : ""); + +$template->process("$template_name.txt.tmpl", $vars, \$comment) || ThrowTemplateError($template->error()); ValidateComment($comment);