[Rt-commit] rt branch, 4.0/disable-att-quote-folding, updated. rt-4.0.0-284-g18d4f13

? sunnavy sunnavy at bestpractical.com
Fri May 13 13:05:13 EDT 2011


The branch, 4.0/disable-att-quote-folding has been updated
       via  18d4f13838282617f84c61273f1c37145860c080 (commit)
      from  120d1f330039df0385da21c7422d748bc2afa7ca (commit)

Summary of changes:
 .../Ticket/Elements/ShowTransactionAttachments     |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 18d4f13838282617f84c61273f1c37145860c080
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat May 14 01:03:25 2011 +0800

    we have Filename in table already

diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index 4fac37e..ccf35fd 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -144,7 +144,6 @@ my $render_attachment = sub {
 
     # if it has a content-disposition: attachment, don't show inline
     my $disposition = $message->GetHeader('Content-Disposition');
-    my $has_name = $disposition && $disposition =~ /filename=.+/ ? 1 : 0;
 
     if ( $disposition && $disposition =~ /^\s*attachment/i ) {
         $disposition = 'attachment';
@@ -215,7 +214,8 @@ my $render_attachment = sub {
                 );
 
                 require HTML::Quoted;
-                $content = HTML::Quoted->extract( $content ) unless $has_name;
+                $content = HTML::Quoted->extract($content)
+                  unless $message->Filename;
 
                 $m->comp(
                     'ShowMessageStanza',
@@ -233,7 +233,7 @@ my $render_attachment = sub {
             # if it's a text/plain show the body
             elsif ( $message->ContentType =~ m{^(text|message)}i ) {
 
-                unless ( $has_name ) {
+                unless ( $message->Filename ) {
                     eval { require Text::Quoted;  $content = Text::Quoted::extract($content); };
                     if ($@) { $RT::Logger->warning( "Text::Quoted failed: $@" ) }
                 }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list