From 21b50cba4e08e723f8c2d8e8b5800d0a13e2c180 Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Wed, 2 Jan 2013 17:09:36 +0000 Subject: Bug 413851 - add CSV output option to request lists. r=LpSolit. --- report.cgi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'report.cgi') diff --git a/report.cgi b/report.cgi index e70dcf4b2..69aadddbd 100755 --- a/report.cgi +++ b/report.cgi @@ -309,11 +309,8 @@ my $format = $template->get_format("reports/report", $formatparam, # set debug=1 to always get an HTML content-type, and view the error. $format->{'ctype'} = "text/html" if $cgi->param('debug'); -my @time = localtime(time()); -my $date = sprintf "%04d-%02d-%02d", 1900+$time[5],$time[4]+1,$time[3]; -my $filename = "report-$date.$format->{extension}"; -print $cgi->header(-type => $format->{'ctype'}, - -content_disposition => "inline; filename=$filename"); +$cgi->set_dated_content_disp("inline", "report", $format->{extension}); +print $cgi->header($format->{'ctype'}); # Problems with this CGI are often due to malformed data. Setting debug=1 # prints out both data structures. -- cgit v1.2.3-24-g4f1b