Bug 499151: Only call format_comment when it's actually needed, as a slight
performance improvement. r=glob, a=LpSolit git-svn-id: svn://10.0.0.236/trunk@259768 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bcd3592f3b
commit
539d396c69
@ -1 +1 @@
|
||||
7011
|
||||
7012
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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 %]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user