summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/Comment.pm13
-rw-r--r--template/en/default/bug/format_comment.txt.tmpl4
2 files changed, 10 insertions, 7 deletions
diff --git a/Bugzilla/Comment.pm b/Bugzilla/Comment.pm
index 60d26012f..f19c64d78 100644
--- a/Bugzilla/Comment.pm
+++ b/Bugzilla/Comment.pm
@@ -119,10 +119,15 @@ sub body_full {
$params ||= {};
my $template = Bugzilla->template_inner;
my $body;
- $template->process("bug/format_comment.txt.tmpl",
- { comment => $self, %$params }, \$body)
- || ThrowTemplateError($template->error());
- $body =~ s/^X//;
+ if ($self->type) {
+ $template->process("bug/format_comment.txt.tmpl",
+ { comment => $self, %$params }, \$body)
+ || ThrowTemplateError($template->error());
+ $body =~ s/^X//;
+ }
+ else {
+ $body = $self->body;
+ }
if ($params->{wrap} and !$self->already_wrapped) {
$body = wrap_comment($body);
}
diff --git a/template/en/default/bug/format_comment.txt.tmpl b/template/en/default/bug/format_comment.txt.tmpl
index 2d4a20303..7a65aed24 100644
--- a/template/en/default/bug/format_comment.txt.tmpl
+++ b/template/en/default/bug/format_comment.txt.tmpl
@@ -63,8 +63,6 @@ Comment on attachment [% comment.extra_data %]
[%+ comment.attachment.description %]
[%+ comment.body %]
-[% ELSIF comment.type %]
- [% Hook.process('type') %]
[% ELSE %]
-X[% comment_body %]
+X[% Hook.process('type') %]
[% END %]