diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php
index 8c5491cae82..87522846cc8 100644
--- a/htdocs/admin/security_other.php
+++ b/htdocs/admin/security_other.php
@@ -64,6 +64,19 @@ else if ($_GET["action"] == 'disable_captcha')
exit;
}
+if ($_GET["action"] == 'activate_avscan')
+{
+ dolibarr_set_const($db, "MAIN_USE_AVSCAN", '1');
+ Header("Location: security_other.php");
+ exit;
+}
+else if ($_GET["action"] == 'disable_avscan')
+{
+ dolibarr_del_const($db, "MAIN_USE_AVSCAN");
+ Header("Location: security_other.php");
+ exit;
+}
+
/*
* Affichage onglet
@@ -169,6 +182,49 @@ print "";
print "";
print '';
+// Enable AV scanner
+$var=!$var;
+print "
";
+print ''.$langs->trans("UseAvToScanUploadedFiles");
+if($conf->global->MAIN_USE_AVSCAN == 1)
+{
+ print ' ';
+ // Clamav
+ if (function_exists("cl_scanfile"))
+ {
+ print cl_info();
+ }
+}
+print ' | ';
+print '';
+if($conf->global->MAIN_USE_AVSCAN == 1)
+{
+ print img_tick();
+}
+print ' | ';
+print '';
+if (function_exists("cl_scanfile")) // Clamav
+{
+ if ($conf->global->MAIN_USE_AVSCAN == 0)
+ {
+ print ''.$langs->trans("Activate").'';
+ }
+ if($conf->global->MAIN_USE_AVSCAN == 1)
+ {
+ print ''.$langs->trans("Disable").'';
+ }
+}
+else
+{
+ $html = new Form($db);
+ $desc = $html->textwithwarning('',$langs->transnoentities("EnablePhpAVModuleDesc"),1);
+ print $desc;
+}
+print " | ";
+
+print "";
+print '
';
+
print '';
print '';