Fix removing of obsolete year directory.

This commit is contained in:
Darold Gilles 2016-11-06 12:47:18 +01:00
parent 9a334904b8
commit 126a36a3dc
1 changed files with 3 additions and 3 deletions

View File

@ -3037,11 +3037,11 @@ sub buildHTML
my $p_year = 0;
my $p_week = 0;
if ($self->{history_time} || $self->{sg_history_time} || $self->{end_time}) {
my @ltime = CORE::localtime($self->{history_time});
my @ltime = CORE::localtime($self->{history_time} || $self->{sg_history_time} || $self->{end_time});
if ($self->{is_squidguard_log}) {
@ltime = CORE::localtime($self->{sg_history_time});
@ltime = CORE::localtime($self->{sg_history_time} || $self->{end_time});
} elsif ($self->{is_ufdbguard_log}) {
@ltime = CORE::localtime($self->{ug_history_time});
@ltime = CORE::localtime($self->{ug_history_time} || $self->{end_time});
}
$old_year = $ltime[5]+1900;
$old_month = $ltime[4]+1;