calamaris: Fix viewing reports.

Fixes that only the last created report could be viewed (#10259).
This commit is contained in:
Michael Tremer
2012-11-26 10:55:32 +01:00
parent c4e0412235
commit d46bec5299
2 changed files with 3 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
etc/system-release
etc/issue
srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
srv/web/ipfire/cgi-bin/ovpnmain.cgi
usr/sbin/ovpn-ccd-convert
var/ipfire/general-functions.pl

View File

@@ -98,6 +98,7 @@ if ($reportsettings{'ACTION'} eq $Lang::tr{'calamaris create report'})
delete $reportsettings{'DAY_END'};
delete $reportsettings{'MONTH_END'};
delete $reportsettings{'YEAR_END'};
delete $reportsettings{'REPORT'};
&General::writehash("${General::swroot}/proxy/calamaris/settings", \%reportsettings);
@@ -493,12 +494,11 @@ END
if (@reports)
{
print "<td><select name='REPORT' size='5'>\n";
my $n=0;
foreach (@reports)
{
@reportdata=split(/#/);
print "\t<option ";
if ($n eq '0') { print "selected "; $reportsettings{'REPORT'}=$reportdata[1]; $n++}
if ($reportsettings{'REPORT'} eq $reportdata[1]) { print "selected ";}
print "value='$reportdata[1]'>$reportdata[2] &nbsp;-&nbsp; $reportdata[3]</option>\n";
}
print "</select></td>\n";