doxygen and $db bot defined

This commit is contained in:
Frédéric FRANCE 2019-12-10 07:51:39 +01:00 committed by GitHub
parent c0e23c7b71
commit f4674a7558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -958,18 +958,18 @@ function dol_unescapefile($filename)
*/ */
function dolCheckVirus($src_file) function dolCheckVirus($src_file)
{ {
global $conf; global $conf, $db;
if (! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) if (! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
{ {
if (! class_exists('AntiVir')) { if (! class_exists('AntiVir')) {
require_once DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php';
} }
$antivir=new AntiVir($db); $antivir = new AntiVir($db);
$result = $antivir->dol_avscan_file($src_file); $result = $antivir->dol_avscan_file($src_file);
if ($result < 0) // If virus or error, we stop here if ($result < 0) // If virus or error, we stop here
{ {
$reterrors=$antivir->errors; $reterrors = $antivir->errors;
return $reterrors; return $reterrors;
} }
} }
@ -992,7 +992,7 @@ function dolCheckVirus($src_file)
* @param integer $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error']) * @param integer $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error'])
* @param int $nohook Disable all hooks * @param int $nohook Disable all hooks
* @param string $varfiles _FILES var name * @param string $varfiles _FILES var name
* @return int >0 if OK, <0 or string if KO * @return int|string >0 if OK, <0 or string if KO
* @see dol_move * @see dol_move
*/ */
function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile') function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile')