diff --git a/htdocs/html.formmail.class.php b/htdocs/html.formmail.class.php
index 7f08cfbbdec..c7672f766dd 100644
--- a/htdocs/html.formmail.class.php
+++ b/htdocs/html.formmail.class.php
@@ -95,7 +95,7 @@ class FormMail
}
/**
- * Clear list of attached files (store in SECTION array)
+ * Clear list of attached files in send mail form (stored in session)
*/
function clear_attached_files()
{
diff --git a/htdocs/includes/boxes/modules_boxes.php b/htdocs/includes/boxes/modules_boxes.php
index 64e75b866a0..12e6598bad7 100644
--- a/htdocs/includes/boxes/modules_boxes.php
+++ b/htdocs/includes/boxes/modules_boxes.php
@@ -18,18 +18,17 @@
*/
/**
- \file htdocs/includes/boxes/modules_boxes.php
- \ingroup facture
- \brief Fichier contenant la classe m�re des boites
- \version $Id$
-*/
+ * \file htdocs/includes/boxes/modules_boxes.php
+ * \ingroup facture
+ * \brief Fichier contenant la classe mere des boites
+ * \version $Id$
+ */
/**
- \class ModeleBoxes
- \brief Classe m�re des boites
-*/
-
+ * \class ModeleBoxes
+ * \brief Classe mere des boites
+ */
class ModeleBoxes
{
var $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite
diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index f4f06fb895f..836bd9f5fae 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -1699,6 +1699,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite)
// If we need to make a virus scan
if ($conf->global->MAIN_USE_AVSCAN)
{
+ require_once(DOL_DOCUMENT_ROOT.'/lib/security.lib.php');
$malware = dol_avscan_file($src_file);
if ($malware) return $malware;
}
@@ -2036,31 +2037,6 @@ function dol_delete_dir_recursive($dir,$count=0)
return $count;
}
-/**
- \brief Scan les fichiers avec un anti-virus
- \param file Fichier a scanner
- \return malware Nom du virus si infect� sinon retourne "null"
- */
-function dol_avscan_file($file)
-{
- $malware = '';
-
- // Clamav
- if (function_exists("cl_scanfile"))
- {
- $maxreclevel = 5 ; // maximal recursion level
- $maxfiles = 1000; // maximal number of files to be scanned within archive
- $maxratio = 200; // maximal compression ratio
- $archivememlim = 0; // limit memory usage for bzip2 (0/1)
- $maxfilesize = 10485760; // archived files larger than this value (in bytes) will not be scanned
-
- cl_setlimits($maxreclevel, $maxfiles, $maxratio, $archivememlim, $maxfilesize);
- $malware = cl_scanfile($file);
- }
-
- return $malware;
-}
-
/**
* \brief Fonction qui retourne un taux de tva format� pour visualisation
@@ -2408,7 +2384,7 @@ function picto_required()
/**
- * \brief Clean an url
+ * \brief Clean an url string
* \param url Url
* \param http 1: keep http, 0: remove also http
* \return string CleanUrl
diff --git a/htdocs/lib/security.lib.php b/htdocs/lib/security.lib.php
index 9e11393de5a..1aa02eafa6e 100644
--- a/htdocs/lib/security.lib.php
+++ b/htdocs/lib/security.lib.php
@@ -18,19 +18,19 @@
*/
/**
- \file htdocs/lib/security.lib.php
- \brief Ensemble de fonctions de securite de dolibarr sous forme de lib
- \version $Id$
-*/
+ * \file htdocs/lib/security.lib.php
+ * \brief Ensemble de fonctions de securite de dolibarr sous forme de lib
+ * \version $Id$
+ */
/**
- \brief Fonction pour initialiser un salt pour la fonction crypt
- \param $type 2=>renvoi un salt pour cryptage DES
- 12=>renvoi un salt pour cryptage MD5
- non defini=>renvoi un salt pour cryptage par defaut
- \return string Chaine salt
-*/
+ * \brief Fonction pour initialiser un salt pour la fonction crypt
+ * \param $type 2=>renvoi un salt pour cryptage DES
+ * 12=>renvoi un salt pour cryptage MD5
+ * non defini=>renvoi un salt pour cryptage par defaut
+ * \return string Chaine salt
+ */
function makesalt($type=CRYPT_SALT_LENGTH)
{
dolibarr_syslog("security.lib.php::makesalt type=".$type);
@@ -146,4 +146,30 @@ function dol_decode($chain)
return $string_decoded;
}
+
+/**
+ * \brief Scan les fichiers avec un anti-virus
+ * \param file Fichier a scanner
+ * \return malware Nom du virus si infect� sinon retourne "null"
+ */
+function dol_avscan_file($file)
+{
+ $malware = '';
+
+ // Clamav
+ if (function_exists("cl_scanfile"))
+ {
+ $maxreclevel = 5 ; // maximal recursion level
+ $maxfiles = 1000; // maximal number of files to be scanned within archive
+ $maxratio = 200; // maximal compression ratio
+ $archivememlim = 0; // limit memory usage for bzip2 (0/1)
+ $maxfilesize = 10485760; // archived files larger than this value (in bytes) will not be scanned
+
+ cl_setlimits($maxreclevel, $maxfiles, $maxratio, $archivememlim, $maxfilesize);
+ $malware = cl_scanfile($file);
+ }
+
+ return $malware;
+}
+
?>
\ No newline at end of file
diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php
index dde50317e16..6a6e8632f6f 100644
--- a/htdocs/societe.class.php
+++ b/htdocs/societe.class.php
@@ -775,7 +775,7 @@ class Societe extends CommonObject
$this->db->commit();
- // Suppression du r�pertoire document
+ // Suppression du repertoire document
$docdir = $conf->societe->dir_output . "/" . $id;
if (file_exists ($docdir))
{