[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-commit
Subject: [Rt-commit] [svn] r1931 - in rt/branches/3.3-TESTING: .
From: jesse () pallas ! eruditorum ! org
Date: 2004-11-22 19:44:10
Message-ID: 20041122194410.CD34A84C139 () pallas ! eruditorum ! org
[Download RAW message or body]
Author: jesse
Date: Mon Nov 22 14:44:10 2004
New Revision: 1931
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/html/Ticket/Elements/ShowTransactionAttachments
Log:
r9333@tinbook: jesse | 2004-11-22T19:44:47.283026Z
r9322@tinbook: jesse | 2004-11-22T18:41:02.001214Z
RT-Ticket: 6276
RT-Status: resolved
RT-Update: correspond
Now honor the RT::MaxInlineBody configuration variable. Also, the \
Content-Disposition header. We no longer display long attachments inline if they \
were marked as attachments.
Modified: rt/branches/3.3-TESTING/html/Ticket/Elements/ShowTransactionAttachments
==============================================================================
--- rt/branches/3.3-TESTING/html/Ticket/Elements/ShowTransactionAttachments (original)
+++ rt/branches/3.3-TESTING/html/Ticket/Elements/ShowTransactionAttachments Mon Nov \
22 14:44:10 2004 @@ -79,21 +79,24 @@
}
</%PERL>
-<A HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename \
| u%>"><&|/l&>Download</&><%$message->Filename || loc('(untitled)') %></a> +<A \
HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | \
u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a> <div \
class="downloadcontenttype"> <%$message->ContentType%> <% $size %>
</div>
</div>
-%}
-
+% }
% # }}}
<div class="messagebody">
<%perl>
-# {{{ if it's got content-disposition inline, show it inline
+# {{{ if it has a content-disposition: attachment, don't show inline
+unless ( $message->GetHeader('Content-Disposition') =~ /attachment/i ) {
+
my $content;
# If it's text
- if ( $message->ContentType =~ m{^(text|message)}i ) {
+ if ( $message->ContentType =~ m{^(text|message)}i
+ && $size <= $RT::MaxInlineBody )
+ {
if (
@@ -127,7 +130,7 @@
if ( $message->ContentType =~ m{^text/(?:html|enriched)$}i ) {
$content =
$m->comp( '/Elements/ScrubHTML', Content => $content );
- $m->out( $content );
+ $m->out($content);
}
# if it's a text/plain show the body
@@ -146,23 +149,26 @@
}
}
- # if it's an image, show it as an image
- elsif ( $message->ContentType =~ /^image\//i ) {
- $m->out('<img src="'
- . $AttachPath . '/'
- . $Transaction->Id . '/'
- . $message->Id
- . '/">' );
- }
+ # if it's an image, show it as an image
+ elsif ( $message->ContentType =~ /^image\//i ) {
+ $m->out('<img src="'
+ . $AttachPath . '/'
+ . $Transaction->Id . '/'
+ . $message->Id
+ . '/">' );
+ }
+}
- # }}}
-
- $m->comp( 'ShowTransactionAttachments', %ARGS,
- Parent => $message->id,
- ParentObj => $message );
+# }}}
+$m->comp(
+ 'ShowTransactionAttachments', %ARGS,
+ Parent => $message->id,
+ ParentObj => $message
+);
+## Please see file perltidy.ERR
}
</%PERL>
</div>
_______________________________________________
Rt-commit mailing list
Rt-commit@lists.bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic