projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
import rt 3.8.9
[freeside.git]
/
rt
/
html
/
Ticket
/
Elements
/
ShowTransactionAttachments
diff --git
a/rt/html/Ticket/Elements/ShowTransactionAttachments
b/rt/html/Ticket/Elements/ShowTransactionAttachments
index
d9e94ff
..
662b744
100644
(file)
--- a/
rt/html/Ticket/Elements/ShowTransactionAttachments
+++ b/
rt/html/Ticket/Elements/ShowTransactionAttachments
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-200
5
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-200
9
Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-22,7
+22,9
@@
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
-%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
@@
-79,10
+81,10
@@
foreach my $message ( grep { $_->Parent == $Parent } @$Attachments ) {
}
</%PERL>
}
</%PERL>
-<
A HREF="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
-<
div
class="downloadcontenttype">
-<%$message->ContentType%> <% $size %>
-</
div
>
+<
a href="<%$AttachPath%>/<%$Transaction->Id%>/<%$message->Id%>/<%$message->Filename | u%>"><&|/l&>Download</&> <%$message->Filename || loc('(untitled)') %></a>
+<
span
class="downloadcontenttype">
+[<%$message->ContentType%> <% $size %>]
+</
span
>
</div>
% }
% # }}}
</div>
% }
% # }}}
@@
-95,6
+97,7
@@
unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# If it's text
if ( $message->ContentType =~ m{^(text|message)}i
# If it's text
if ( $message->ContentType =~ m{^(text|message)}i
+ && !($RT::SuppressInlineTextFiles && $message->Filename)
&& $message->ContentLength <= $RT::MaxInlineBody )
{
&& $message->ContentLength <= $RT::MaxInlineBody )
{
@@
-136,7
+139,7
@@
unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
# if it's a text/plain show the body
elsif ( $message->ContentType =~ m{^(text|message|text)}i ) {
# if it's a text/plain show the body
elsif ( $message->ContentType =~ m{^(text|message|text)}i ) {
- eval { $content = Text::Quoted::extract($content); };
+ eval {
require Text::Quoted;
$content = Text::Quoted::extract($content); };
if ($@) { 1; }
$m->comp(
if ($@) { 1; }
$m->comp(
@@
-151,12
+154,12
@@
unless ( ($message->GetHeader('Content-Disposition')||"") =~ /attachment/i ) {
}
# if it's an image, show it as an image
}
# if it's an image, show it as an image
- elsif ( $message->ContentType =~ /^image\//i ) {
+ elsif ( $
RT::ShowTransactionImages and $
message->ContentType =~ /^image\//i ) {
$m->out('<img src="'
. $AttachPath . '/'
. $Transaction->Id . '/'
. $message->Id
$m->out('<img src="'
. $AttachPath . '/'
. $Transaction->Id . '/'
. $message->Id
- . '/">' );
+ . '/"
/
>' );
}
elsif ( $message->ContentLength > 0 ) {
$m->out(
}
elsif ( $message->ContentLength > 0 ) {
$m->out(
@@
-173,9
+176,9
@@
$m->comp(
ParentObj => $message
);
ParentObj => $message
);
-}
</%PERL>
</div>
</%PERL>
</div>
+% }
<%ARGS>
$Ticket => undef
$Transaction => undef
<%ARGS>
$Ticket => undef
$Transaction => undef