aboutsummaryrefslogtreecommitdiffstats
path: root/config/havp
diff options
context:
space:
mode:
Diffstat (limited to 'config/havp')
-rw-r--r--config/havp/antivirus.php7
-rw-r--r--config/havp/havp.inc4
2 files changed, 8 insertions, 3 deletions
diff --git a/config/havp/antivirus.php b/config/havp/antivirus.php
index f86982e5..0d66a6b3 100644
--- a/config/havp/antivirus.php
+++ b/config/havp/antivirus.php
@@ -176,6 +176,11 @@ if ($_POST['startupdate'] != '') {
# else echo "No 'start_antivirus_scanner' function found.";
}
+/* Clear havp access log */
+if ($_POST['clearlog_x'] != '') {
+ file_put_contents(HVDEF_HAVP_ACCESSLOG, '');
+}
+
# ------------------------------------------------------------------------------
?>
@@ -357,7 +362,7 @@ if (pfsense_version_A() == '1') {
}
else echo "<tr><td $stl>Not found</td></tr>";
?>
- <tr class="listr"><td class="listr" colspan="4"><?php echo get_av_statistic(); ?></td></tr>
+ <tr class="listr"><td class="listr" colspan="4"><?php echo get_av_statistic(); ?><?php echo "<div style='float:right;'><input title='Clear antivirus log' name='clearlog' type='image' value='havp' border=0 src='./themes/".$g['theme']."/images/icons/icon_x.gif'>"; ?><font size="-1">&nbsp;Clear log</font></div></td></tr>
</tbody></table>
</td>
</tr>
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).";
}