mirror of
https://github.com/darold/squidanalyzer.git
synced 2025-07-30 01:14:28 +02:00
Fix test to exclude old months and days from the statistics builder. Thanks to ammdispose for the patch.
This commit is contained in:
parent
c1b4cdb535
commit
e0888df14d
@ -1226,12 +1226,12 @@ sub buildHTML
|
||||
`$RM_PROG -rf $outdir/$y/$m`;
|
||||
next;
|
||||
}
|
||||
next if ($m < $old_month);
|
||||
next if ("$y$m" < "$old_year$old_month");
|
||||
opendir(DIR, "$outdir/$y/$m") || die "Error: can't opendir $outdir/$y/$m: $!";
|
||||
my @days = grep { /^\d{2}$/ && -d "$outdir/$y/$m/$_"} readdir(DIR);
|
||||
closedir DIR;
|
||||
foreach my $d (sort {$a <=> $b} @days) {
|
||||
next if ($d < $old_day);
|
||||
next if ("$y$m$d" < "$old_year$old_month$old_day");
|
||||
print STDERR "Generating daily statistics for day $y-$m-$d\n" if (!$self->{QuietMode});
|
||||
$self->gen_html_output($outdir, $y, $m, $d);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user