From ab46ec806f2b46f59b48e3356868c3b1a4a614f6 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Mon, 5 Jan 2026 19:29:54 +0200 Subject: [PATCH] Fix action log clearing not to purge the previous logs on each save if the time option is not set --- web-lib-funcs.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl index 4357fa991..8119baa26 100755 --- a/web-lib-funcs.pl +++ b/web-lib-funcs.pl @@ -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");