Fix: Error management
This commit is contained in:
parent
e6a3225ae7
commit
00f3f5903e
@ -64,9 +64,11 @@ if ($_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
|
|||||||
{
|
{
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
|
||||||
}
|
}
|
||||||
else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus
|
else if (preg_match('/ErrorFileIsInfectedWithAVirus.(.*)/',$resupload,$reg)) // Files infected by a virus
|
||||||
{
|
{
|
||||||
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus").'</div>';
|
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWithAVirus");
|
||||||
|
$mesg.= '<br>'.$langs->trans("Information").': '.$langs->trans($reg[1]);
|
||||||
|
$mesg.= '</div>';
|
||||||
}
|
}
|
||||||
else // Known error
|
else // Known error
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,9 +50,10 @@ class AntiVir
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Scan a file with antivirus
|
* Scan a file with antivirus.
|
||||||
* \param file File to scan
|
* This function runs the command defined in setup. This antivirus command must return 0 if OK.
|
||||||
* \return int <0 if KO (-98 if error, -99 if virus), 0 if OK
|
* @param file File to scan
|
||||||
|
* @return int <0 if KO (-98 if error, -99 if virus), 0 if OK
|
||||||
*/
|
*/
|
||||||
function dol_avscan_file($file)
|
function dol_avscan_file($file)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user