]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 138904 - post_bug templates should be separate. Patch by gerv, 2xr=myk.
authorgerv%gerv.net <>
Mon, 29 Apr 2002 05:05:31 +0000 (05:05 +0000)
committergerv%gerv.net <>
Mon, 29 Apr 2002 05:05:31 +0000 (05:05 +0000)
post_bug.cgi

index 1434921308cd980eadb767bf1c517445a37cb23b..b6f7f5268bfac04662cc8ff8bb0ed0f0b6a82bf8 100755 (executable)
@@ -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);