mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Fix action log clearing not to purge the previous logs on each save if the time option is not set
This commit is contained in:
@@ -7214,8 +7214,9 @@ if ($gconfig{'logclear'}) {
|
||||
# check if it is time to clear the log
|
||||
my @st = stat("$webmin_logfile.time");
|
||||
my $write_logtime = 0;
|
||||
my $log_time = $gconfig{'logtime'} || 168;
|
||||
if (@st) {
|
||||
if ($st[9]+$gconfig{'logtime'}*60*60 < time()) {
|
||||
if ($st[9]+$log_time*60*60 < time()) {
|
||||
# clear logfile and all diff files
|
||||
&unlink_file("$ENV{'WEBMIN_VAR'}/diffs");
|
||||
&unlink_file("$ENV{'WEBMIN_VAR'}/files");
|
||||
|
||||
Reference in New Issue
Block a user