diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2016-01-07 21:45:23 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2016-01-07 21:45:23 +0100 |
commit | 2fdc142ef1119b9fc2741181ee4386c64c3c1677 (patch) | |
tree | fc28d1bc682d76060a21807d5f65d61f15f95454 | |
parent | f6fd37da0f2c1792b1f804147a54fd0ea1212f54 (diff) | |
download | bugs-2fdc142ef1119b9fc2741181ee4386c64c3c1677.tar bugs-2fdc142ef1119b9fc2741181ee4386c64c3c1677.tar.gz bugs-2fdc142ef1119b9fc2741181ee4386c64c3c1677.tar.bz2 bugs-2fdc142ef1119b9fc2741181ee4386c64c3c1677.tar.xz bugs-2fdc142ef1119b9fc2741181ee4386c64c3c1677.zip |
Bug 402039: Exporting CSV from chart.cgi doesn't set mimetype, content_disposition, or filename
r/a=dkl
-rwxr-xr-x | chart.cgi | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -305,16 +305,15 @@ sub plot { $vars->{'chart'} = new Bugzilla::Chart($cgi); my $format = $template->get_format("reports/chart", "", scalar($cgi->param('ctype'))); + $format->{'ctype'} = 'text/html' if $cgi->param('debug'); - # Debugging PNGs is a pain; we need to be able to see the error messages - if ($cgi->param('debug')) { - print $cgi->header(); - $vars->{'chart'}->dump(); - } - + $cgi->set_dated_content_disp('inline', 'chart', $format->{extension}); print $cgi->header($format->{'ctype'}); disable_utf8() if ($format->{'ctype'} =~ /^image\//); + # Debugging PNGs is a pain; we need to be able to see the error messages + $vars->{'chart'}->dump() if $cgi->param('debug'); + $template->process($format->{'template'}, $vars) || ThrowTemplateError($template->error()); } |