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

Thomas Sibley trs at bestpractical.com
Fri May 13 12:38:48 EDT 2011


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

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

- Log -----------------------------------------------------------------
commit 120d1f330039df0385da21c7422d748bc2afa7ca
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 13 12:35:56 2011 -0400

    Our Content-Disposition inspecting condition can be simplified
    
    The valid dispositions are inline and attachment, and they must be at
    the beginning of the string.  We don't need to check for =~
    /attachment/i (note lack of anchors) and !~ /^\s*inline/ (note case
    sensitivity) since we can just check for =~ /^\s*attachment/i.

diff --git a/share/html/Ticket/Elements/ShowTransactionAttachments b/share/html/Ticket/Elements/ShowTransactionAttachments
index ecbbc12..4fac37e 100644
--- a/share/html/Ticket/Elements/ShowTransactionAttachments
+++ b/share/html/Ticket/Elements/ShowTransactionAttachments
@@ -146,7 +146,7 @@ my $render_attachment = sub {
     my $disposition = $message->GetHeader('Content-Disposition');
     my $has_name = $disposition && $disposition =~ /filename=.+/ ? 1 : 0;
 
-    if ( $disposition && $disposition =~ /attachment/i && $disposition !~ /^\s*inline/ ) {
+    if ( $disposition && $disposition =~ /^\s*attachment/i ) {
         $disposition = 'attachment';
     } else {
         $disposition = 'inline';

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


More information about the Rt-commit mailing list