]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 181182 - Reporting fix pack 2. Fixes bug 179198 (Don't print labels for pie chart...
authorgerv%gerv.net <>
Fri, 22 Nov 2002 08:07:19 +0000 (08:07 +0000)
committergerv%gerv.net <>
Fri, 22 Nov 2002 08:07:19 +0000 (08:07 +0000)
report.cgi
template/en/default/reports/report-pie.png.tmpl
template/en/default/reports/report.html.tmpl

index c532d523dde1a93829bc610a934257df24f461b8..f727ee466302b11ab66dc4613639b7b84098d3c6 100755 (executable)
@@ -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
index f34397e121b0192eec49a1336ca062bbc98e41a9..76a717779603626459aca87017c8335dec07492c 100644 (file)
 [% FILTER null;
   USE graph = GD.Graph.pie(width, height);
     
-  graph.set(title       => col_field_disp,
-            pie_height  => 20,
-            start_angle => 180);
+  graph.set(title          => col_field_disp,
+            pie_height     => 20,
+            suppress_angle => 2,
+            start_angle    => 180);
     
   graph.plot(data.0).png | stdout(1);
   END;
index 07d926a649f5d63bbcf70d8a7efd2362c32cd93d..494dd796f9be5c07622649d8ce3793e1e36bc46c 100644 (file)
           [% other_format.description %]
           [% "</a>" UNLESS other_format.name == format %] | 
         [% END %]
-        <a href="[% formaturl %]&amp;ctype=csv">CSV</a> 
+        <a href="[% formaturl %]&amp;ctype=csv&amp;format=table">CSV</a> 
       </td>
       
       [% IF format != "table" %]