summaryrefslogtreecommitdiffstats
path: root/report.cgi
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-11-22 09:07:19 +0100
committergerv%gerv.net <>2002-11-22 09:07:19 +0100
commit0197f0738a4e649338a6ac647bc924d34da9ad11 (patch)
treea5d40edde835736ed0822f7934c918339846afed /report.cgi
parent34d0206a1debacd3630cad4672c6996806233918 (diff)
downloadbugzilla-0197f0738a4e649338a6ac647bc924d34da9ad11.tar.gz
bugzilla-0197f0738a4e649338a6ac647bc924d34da9ad11.tar.xz
Bug 181182 - Reporting fix pack 2. Fixes bug 179198 (Don't print labels for pie chart wedges when smaller than a certain size), bug 180255 (Tabular report CSV downloads should suggest csv filename), and bug 180967 (csv reports swap rows/columns). Patch by gerv; r=joel, a=justdave.
Diffstat (limited to 'report.cgi')
-rwxr-xr-xreport.cgi10
1 files changed, 7 insertions, 3 deletions
diff --git a/report.cgi b/report.cgi
index c532d523d..f727ee466 100755
--- a/report.cgi
+++ b/report.cgi
@@ -120,13 +120,13 @@ $columns{''} = "42217354";
# Validate the values in the axis fields or throw an error.
!$row_field
|| ($columns{$row_field} && trick_taint($row_field))
- || ThrowCodeError("report_axis_invalid", { fld=>"x", val=>$row_field });
+ || ThrowCodeError("report_axis_invalid", {fld => "x", val => $row_field});
!$col_field
|| ($columns{$col_field} && trick_taint($col_field))
- || ThrowCodeError("report_axis_invalid", { fld=>"y", val=>$col_field });
+ || ThrowCodeError("report_axis_invalid", {fld => "y", val => $col_field});
!$tbl_field
|| ($columns{$tbl_field} && trick_taint($tbl_field))
- || ThrowCodeError("report_axis_invalid", { fld=>"z", val=>$tbl_field });
+ || ThrowCodeError("report_axis_invalid", {fld => "z", val => $tbl_field});
my @axis_fields = ($row_field, $col_field, $tbl_field);
@@ -260,6 +260,10 @@ my $format = GetFormat("reports/report", $formatparam, $cgi->param('ctype'));
# set debug=1 to always get an HTML content-type, and view the error.
$format->{'ctype'} = "text/html" if $::FORM{'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 "Content-Disposition: inline; filename=$filename\n";
print "Content-Type: $format->{'ctype'}\n\n";
# Problems with this CGI are often due to malformed data. Setting debug=1