[Rt-commit] rt branch, 4.4/outgoing-txn-recipients, created. rt-4.4.1-434-gc4a0a42
Shawn Moore
shawn at bestpractical.com
Mon Jul 3 12:17:26 EDT 2017
The branch, 4.4/outgoing-txn-recipients has been created
at c4a0a42c5c7461ff04b44c33efdfea752ba40279 (commit)
- Log -----------------------------------------------------------------
commit c4a0a42c5c7461ff04b44c33efdfea752ba40279
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Mon Jul 3 16:15:08 2017 +0000
Show recipients in "Outgoing email recorded" transactions
This moves the logic to skip rendering the email body in transaction
history from ShowTransaction to ShowTransactionAttachments since we want
the message headers to be rendered.
Fixes: T#32881
diff --git a/share/html/Elements/ShowTransaction b/share/html/Elements/ShowTransaction
index bae9156..e22d0d2 100644
--- a/share/html/Elements/ShowTransaction
+++ b/share/html/Elements/ShowTransaction
@@ -156,8 +156,6 @@ if ( $txn_type =~ /EmailRecord$/ ) {
.'&Transaction='. $Transaction->id
.'&Attachment='. ( $Attachments->{0}[0] && $Attachments->{0}[0]->id ),
} if $EmailRecordPath;
-
- $ShowBody = 0;
}
# If the transaction has anything attached to it at all
diff --git a/share/html/Elements/ShowTransactionAttachments b/share/html/Elements/ShowTransactionAttachments
index e282de9..66f8fbf 100644
--- a/share/html/Elements/ShowTransactionAttachments
+++ b/share/html/Elements/ShowTransactionAttachments
@@ -57,8 +57,11 @@ foreach my $message ( @{ $Attachments->{ $Parent || 0 } || [] } ) {
my $name = defined $message->Filename && length $message->Filename ? $message->Filename : '';
my $should_render_download = $message->ContentLength || $name;
+ my $should_render_body = $Transaction->Type =~ /EmailRecord$/ ? 0 : 1;
- $m->callback(CallbackName => 'BeforeAttachment', ARGSRef => \%ARGS, Object => $Object, Transaction => $Transaction, Attachment => $message, Name => $name, ShouldRenderDownload => \$should_render_download);
+ $m->callback(CallbackName => 'BeforeAttachment', ARGSRef => \%ARGS, Object => $Object, Transaction => $Transaction, Attachment => $message, Name => $name, ShouldRenderDownload => \$should_render_download, ShouldRenderBody => \$should_render_body);
+
+ next if !$should_render_body;
if ($should_render_download) {
</%PERL>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list