[Rt-commit] rt branch, 4.2/download-0-length-files, created. rt-4.2.3-83-g2f90c9e
Alex Vandiver
alexmv at bestpractical.com
Wed Apr 9 17:15:47 EDT 2014
The branch, 4.2/download-0-length-files has been created
at 2f90c9e63582bbc5c1b3efcc77f67d95f6b2863f (commit)
- Log -----------------------------------------------------------------
commit 2f90c9e63582bbc5c1b3efcc77f67d95f6b2863f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Apr 9 17:15:38 2014 -0400
Allow downloading 0-length files if they have a name
Resolves I#9050
diff --git a/share/html/Elements/ShowTransactionAttachments b/share/html/Elements/ShowTransactionAttachments
index e9b913f..6dd3eed 100644
--- a/share/html/Elements/ShowTransactionAttachments
+++ b/share/html/Elements/ShowTransactionAttachments
@@ -56,7 +56,7 @@ foreach my $message ( @{ $Attachments->{ $Parent || 0 } || [] } ) {
);
my $name = defined $message->Filename && length $message->Filename ? $message->Filename : '';
- if ( $message->ContentLength ) {
+ if ( $message->ContentLength or $name ) {
</%PERL>
<div class="downloadattachment">
<a href="<% $AttachmentPath %>/<% $Transaction->Id %>/<% $message->Id %>/<% $name | u%>"><&|/l&>Download</&> <% length $name ? $name : loc('(untitled)') %></a>\
-----------------------------------------------------------------------
More information about the rt-commit
mailing list