Doxygen
This commit is contained in:
parent
e6107ea32f
commit
5604b3dc81
@ -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()
|
function clear_attached_files()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18,18 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/includes/boxes/modules_boxes.php
|
* \file htdocs/includes/boxes/modules_boxes.php
|
||||||
\ingroup facture
|
* \ingroup facture
|
||||||
\brief Fichier contenant la classe m<EFBFBD>re des boites
|
* \brief Fichier contenant la classe mere des boites
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class ModeleBoxes
|
* \class ModeleBoxes
|
||||||
\brief Classe m<EFBFBD>re des boites
|
* \brief Classe mere des boites
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ModeleBoxes
|
class ModeleBoxes
|
||||||
{
|
{
|
||||||
var $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite
|
var $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite
|
||||||
|
|||||||
@ -1699,6 +1699,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite)
|
|||||||
// If we need to make a virus scan
|
// If we need to make a virus scan
|
||||||
if ($conf->global->MAIN_USE_AVSCAN)
|
if ($conf->global->MAIN_USE_AVSCAN)
|
||||||
{
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT.'/lib/security.lib.php');
|
||||||
$malware = dol_avscan_file($src_file);
|
$malware = dol_avscan_file($src_file);
|
||||||
if ($malware) return $malware;
|
if ($malware) return $malware;
|
||||||
}
|
}
|
||||||
@ -2036,31 +2037,6 @@ function dol_delete_dir_recursive($dir,$count=0)
|
|||||||
return $count;
|
return $count;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
\brief Scan les fichiers avec un anti-virus
|
|
||||||
\param file Fichier a scanner
|
|
||||||
\return malware Nom du virus si infect<EFBFBD> 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<EFBFBD> pour visualisation
|
* \brief Fonction qui retourne un taux de tva format<EFBFBD> pour visualisation
|
||||||
@ -2408,7 +2384,7 @@ function picto_required()
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Clean an url
|
* \brief Clean an url string
|
||||||
* \param url Url
|
* \param url Url
|
||||||
* \param http 1: keep http, 0: remove also http
|
* \param http 1: keep http, 0: remove also http
|
||||||
* \return string CleanUrl
|
* \return string CleanUrl
|
||||||
|
|||||||
@ -18,19 +18,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/lib/security.lib.php
|
* \file htdocs/lib/security.lib.php
|
||||||
\brief Ensemble de fonctions de securite de dolibarr sous forme de lib
|
* \brief Ensemble de fonctions de securite de dolibarr sous forme de lib
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Fonction pour initialiser un salt pour la fonction crypt
|
* \brief Fonction pour initialiser un salt pour la fonction crypt
|
||||||
\param $type 2=>renvoi un salt pour cryptage DES
|
* \param $type 2=>renvoi un salt pour cryptage DES
|
||||||
12=>renvoi un salt pour cryptage MD5
|
* 12=>renvoi un salt pour cryptage MD5
|
||||||
non defini=>renvoi un salt pour cryptage par defaut
|
* non defini=>renvoi un salt pour cryptage par defaut
|
||||||
\return string Chaine salt
|
* \return string Chaine salt
|
||||||
*/
|
*/
|
||||||
function makesalt($type=CRYPT_SALT_LENGTH)
|
function makesalt($type=CRYPT_SALT_LENGTH)
|
||||||
{
|
{
|
||||||
dolibarr_syslog("security.lib.php::makesalt type=".$type);
|
dolibarr_syslog("security.lib.php::makesalt type=".$type);
|
||||||
@ -146,4 +146,30 @@ function dol_decode($chain)
|
|||||||
return $string_decoded;
|
return $string_decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Scan les fichiers avec un anti-virus
|
||||||
|
* \param file Fichier a scanner
|
||||||
|
* \return malware Nom du virus si infect<EFBFBD> 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;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -775,7 +775,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
|
||||||
// Suppression du r<EFBFBD>pertoire document
|
// Suppression du repertoire document
|
||||||
$docdir = $conf->societe->dir_output . "/" . $id;
|
$docdir = $conf->societe->dir_output . "/" . $id;
|
||||||
if (file_exists ($docdir))
|
if (file_exists ($docdir))
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user