diff options
author | ivan <ivan> | 2006-10-17 08:51:01 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-10-17 08:51:01 +0000 |
commit | a513c0bef534d05f03c1242831b6f3be19b97dae (patch) | |
tree | 2f2a88caf104fef31a3a8dc190ac3fe41dd017c1 /rt/html/Ticket/Elements/ShowTransactionAttachments | |
parent | d4d0590bef31071e8809ec046717444b95b3f30a (diff) |
import rt 3.4.5
Diffstat (limited to 'rt/html/Ticket/Elements/ShowTransactionAttachments')
-rw-r--r-- | rt/html/Ticket/Elements/ShowTransactionAttachments | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rt/html/Ticket/Elements/ShowTransactionAttachments b/rt/html/Ticket/Elements/ShowTransactionAttachments index 8dabff421..d9e94ffa2 100644 --- a/rt/html/Ticket/Elements/ShowTransactionAttachments +++ b/rt/html/Ticket/Elements/ShowTransactionAttachments @@ -89,13 +89,13 @@ foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) { <div class="messagebody"> <%perl> # {{{ if it has a content-disposition: attachment, don't show inline -unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) { +unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) { my $content; # If it's text if ( $message->ContentType =~ m{^(text|message)}i - && $size <= $RT::MaxInlineBody ) + && $message->ContentLength <= $RT::MaxInlineBody ) { if ( @@ -158,6 +158,11 @@ unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) { . $message->Id . '/">' ); } + elsif ( $message->ContentLength > 0 ) { + $m->out( + loc( 'Message body not shown because it is too large or is not plain text.' ) + ); + } } # }}} |