projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d84fbd3
)
Fix filename for Excel spreadsheet reports
author
mark
<mark>
Mon, 14 Dec 2009 03:36:34 +0000
(
03:36
+0000)
committer
mark
<mark>
Mon, 14 Dec 2009 03:36:34 +0000
(
03:36
+0000)
httemplate/search/elements/search-xls.html
patch
|
blob
|
history
diff --git
a/httemplate/search/elements/search-xls.html
b/httemplate/search/elements/search-xls.html
index
8a05e47
..
8323f55
100644
(file)
--- a/
httemplate/search/elements/search-xls.html
+++ b/
httemplate/search/elements/search-xls.html
@@
-13,7
+13,9
@@
my %opt = %{ $args{'opt'} };
#http://support.microsoft.com/kb/199841
http_header('Content-Type' => 'application/vnd.ms-excel' );
#http://support.microsoft.com/kb/199841
http_header('Content-Type' => 'application/vnd.ms-excel' );
-
+http_header('Content-Disposition' =>
+ 'attachment;filename="'.($opt{'name'} || PL($opt{'name_singular'}) ).'.xls"');
+
#http://support.microsoft.com/kb/812935
#http://support.microsoft.com/kb/323308
$HTML::Mason::Commands::r->headers_out->{'Cache-control'} = 'max-age=0';
#http://support.microsoft.com/kb/812935
#http://support.microsoft.com/kb/323308
$HTML::Mason::Commands::r->headers_out->{'Cache-control'} = 'max-age=0';
@@
-79,5
+81,5
@@
foreach my $row ( @$rows ) {
$workbook->close();# or die "Error creating .xls file: $!";
http_header('Content-Length' => length($data) );
$workbook->close();# or die "Error creating .xls file: $!";
http_header('Content-Length' => length($data) );
-
+
</%init>
</%init>