From 94c8b7f2f167dc002172af42a088beed6685fc31 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Mon, 14 Jul 2003 05:25:39 +0000 Subject: Bug 204798 - Total in graph report is incorrect. Patch by kniht@us.ibm.com; r=gerv, a=justdave. --- report.cgi | 2 +- template/en/default/reports/report.html.tmpl | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/report.cgi b/report.cgi index de659ab25..487859190 100755 --- a/report.cgi +++ b/report.cgi @@ -198,7 +198,7 @@ foreach my $tbl (@tbl_names) { push(@tbl_data, \@col_data); } - push(@image_data, \@tbl_data); + unshift(@image_data, \@tbl_data); } $vars->{'col_field'} = $col_field; diff --git a/template/en/default/reports/report.html.tmpl b/template/en/default/reports/report.html.tmpl index 321ad6ae8..31308c10c 100644 --- a/template/en/default/reports/report.html.tmpl +++ b/template/en/default/reports/report.html.tmpl @@ -94,8 +94,16 @@ [% imageurl = BLOCK %]report.cgi?[% imagebase %]&format= [% format FILTER url_quote %]&ctype=png&action=plot& - [% IF tbl_field AND tbl != "-total-" %] - [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]& + [% IF tbl_field %] + [% IF tbl != "-total-" %] + [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %]& + [% ELSE %] + [% FOREACH tblname = tbl_names %] + [% IF tblname != "-total-" %] + [% tbl_field FILTER url_quote %]=[% tblname FILTER url_quote %]& + [% END %] + [% END %] + [% END %] [% END %]width=[% width %]&height=[% height %] [% END %] -- cgit v1.2.3-24-g4f1b