[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[4061] branches/1.3



Revision: 4061
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4061&view=rev
Author:   einhverfr
Date:     2011-11-25 01:12:56 +0000 (Fri, 25 Nov 2011)
Log Message:
-----------
Correcting URL attachment problems

Modified Paths:
--------------
    branches/1.3/Changelog
    branches/1.3/scripts/file.pl

Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog	2011-11-24 23:55:49 UTC (rev 4060)
+++ branches/1.3/Changelog	2011-11-25 01:12:56 UTC (rev 4061)
@@ -10,6 +10,7 @@
 * Fixed invoice tempfiles never being cleaned up (Herman V)
 * Fixed LedgerSMB.pm warnings during tests (Herman V)
 * Allow log-level to be set from config file (Herman V)
+* Corrected 'Invalid Year-end filter' when exporting trial balance (Chris T)
 
 Changelog for LedgerSMB 1.3.6
 * Including xelatex templates under directory templates/xedemo (Chris T)

Modified: branches/1.3/scripts/file.pl
===================================================================
--- branches/1.3/scripts/file.pl	2011-11-24 23:55:49 UTC (rev 4060)
+++ branches/1.3/scripts/file.pl	2011-11-25 01:12:56 UTC (rev 4061)
@@ -43,6 +43,11 @@
     $file->get();
 
     my $cgi = CGI::Simple->new();
+    $file->get_mime_type;
+    if ($file->mime_type_text eq 'text/x-uri'){
+        print $cgi->redirect($file->content);
+        return 0;
+    }
 
     print $cgi->header(
           -type       => $file->get_mime_type,
@@ -50,7 +55,6 @@
           -charset    => 'utf-8',
           -attachment => $file->file_name,
     );
-    print $file->content;
 }
 
 =item show_attachment_screen
@@ -86,6 +90,8 @@
     $file->merge($request);
     if ($request->{url}){
 	$file->mime_type_text('text/x-uri');
+        $file->file_name($request->{url});
+        $file->get_mime_type;
         $file->content($request->{url});
     } else {
         use File::MimeInfo;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.