summaryrefslogtreecommitdiff
path: root/httemplate/search/elements/search-xml.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/elements/search-xml.html')
-rw-r--r--httemplate/search/elements/search-xml.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/httemplate/search/elements/search-xml.html b/httemplate/search/elements/search-xml.html
index 50b191610..18bfe8d82 100644
--- a/httemplate/search/elements/search-xml.html
+++ b/httemplate/search/elements/search-xml.html
@@ -32,9 +32,11 @@ my $header = $args{'header'};
my $rows = $args{'rows'};
my %opt = %{ $args{'opt'} };
+my $filename = $opt{'filename'} ||
+ ($opt{'name'} || PL($opt{'name_singular'}) . 'xml');
+
http_header('Content-Type' => 'application/XML' ); # So saith RFC 4180
-http_header('Content-Disposition' =>
- 'attachment;filename="'.($opt{'name'} || PL($opt{'name_singular'}) ).'.xml"');
+http_header('Content-Disposition' => 'attachment;filename="'.$filename.'"');
unless ( $opt{'fields'} ) {
foreach my $i ( 0 .. ( $#{ @$rows[0] } ) ) {