From e35b8e2cddab228f43f588b5aa9a7236757452dc Mon Sep 17 00:00:00 2001 From: SunStroke74 Date: Wed, 24 Dec 2014 15:13:39 +0500 Subject: Change of find pattern in havp access log file After switching from clamd to libclamav in havp.inc webConfigurator stop parsing of log file because of strong search pattern for clamd - "virus clamd:". Make it more universal. --- config/havp/havp.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/havp/havp.inc b/config/havp/havp.inc index f6e37a3b..08937a2f 100644 --- a/config/havp/havp.inc +++ b/config/havp/havp.inc @@ -1702,7 +1702,7 @@ function havp_get_av_viruslog() $log = explode("\n", $log); $count = 0; foreach($log as $ln) { - if (substr_count(strtolower($ln), "virus clamd:")) + if (substr_count(strtolower($ln), "virus clam")) $s[] = $ln; } } @@ -1716,7 +1716,7 @@ function havp_get_av_statistic() if (file_exists(HVDEF_HAVP_ACCESSLOG)) { $log = file_get_contents(HVDEF_HAVP_ACCESSLOG); - $count = substr_count(strtolower($log), "virus clamd:"); + $count = substr_count(strtolower($log), "virus clam"); $s = "Found $count viruses (total)."; } -- cgit v1.2.3