forked from Wavyzz/dolibarr
NEW Can force the antivirus from conf file or autoprepend ini setup.
This commit is contained in:
@@ -154,6 +154,9 @@ if (ini_get('safe_mode') && !empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_COMMAND) : '').'">';
|
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_COMMAND) : '').'">';
|
||||||
|
if (defined('MAIN_ANTIVIRUS_COMMAND')) {
|
||||||
|
print '<br><span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
|
||||||
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@@ -165,6 +168,9 @@ print '<span class="opacitymedium">'.$langs->trans("AntiVirusParamExample").'</s
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_PARAM) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_PARAM) : '').'">';
|
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(!empty($conf->global->MAIN_ANTIVIRUS_PARAM) ?dol_escape_htmltag($conf->global->MAIN_ANTIVIRUS_PARAM) : '').'">';
|
||||||
|
if (defined('MAIN_ANTIVIRUS_PARAM')) {
|
||||||
|
print '<br><span class="opacitymedium">'.$langs->trans("ValueIsForcedBySystem").'</span>';
|
||||||
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -287,6 +287,18 @@ $dolibarr_cron_allow_cli='0';
|
|||||||
// Examples: '-1' (sending by cli is forbidden)
|
// Examples: '-1' (sending by cli is forbidden)
|
||||||
// $dolibarr_mailing_limit_sendbycli='0';
|
// $dolibarr_mailing_limit_sendbycli='0';
|
||||||
|
|
||||||
|
// MAIN_ANTIVIRUS_COMMAND (as a constant)
|
||||||
|
// Force a value for the antivirus command line tool so setup for admin user interface has no effect.
|
||||||
|
// Default value: ''
|
||||||
|
// Example: '/usr/bin/clamdscan';
|
||||||
|
// define('MAIN_ANTIVIRUS_COMMAND', '/usr/bin/clamdscan');
|
||||||
|
|
||||||
|
// MAIN_ANTIVIRUS_PARAM (as a constant)
|
||||||
|
// Force a value for the antivirus parameters on command line so setup for admin user interface has no effect.
|
||||||
|
// Default value: ''
|
||||||
|
// Example: '--fdpass';
|
||||||
|
// define('MAIN_ANTIVIRUS_PARAM', '--fdpass');
|
||||||
|
|
||||||
|
|
||||||
//##################
|
//##################
|
||||||
// Other
|
// Other
|
||||||
|
|||||||
@@ -684,6 +684,9 @@ class Conf
|
|||||||
// If we are in develop mode, we activate the option MAIN_SECURITY_CSRF_WITH_TOKEN to 1 if not already defined.
|
// If we are in develop mode, we activate the option MAIN_SECURITY_CSRF_WITH_TOKEN to 1 if not already defined.
|
||||||
if (!isset($this->global->MAIN_SECURITY_CSRF_WITH_TOKEN) && $this->global->MAIN_FEATURES_LEVEL >= 2) $this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1;
|
if (!isset($this->global->MAIN_SECURITY_CSRF_WITH_TOKEN) && $this->global->MAIN_FEATURES_LEVEL >= 2) $this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1;
|
||||||
|
|
||||||
|
if (defined('MAIN_ANTIVIRUS_COMMAND')) $this->global->MAIN_ANTIVIRUS_COMMAND = constant('MAIN_ANTIVIRUS_COMMAND');
|
||||||
|
if (defined('MAIN_ANTIVIRUS_PARAM')) $this->global->MAIN_ANTIVIRUS_PARAM = constant('MAIN_ANTIVIRUS_PARAM');
|
||||||
|
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
if (isset($this->product)) $this->produit = $this->product;
|
if (isset($this->product)) $this->produit = $this->product;
|
||||||
if (isset($this->facture)) $this->invoice = $this->facture;
|
if (isset($this->facture)) $this->invoice = $this->facture;
|
||||||
|
|||||||
@@ -1075,13 +1075,11 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($reshook < 0) // At least one blocking error returned by one hook
|
if ($reshook < 0) { // At least one blocking error returned by one hook
|
||||||
{
|
|
||||||
$errmsg = join(',', $hookmanager->errors);
|
$errmsg = join(',', $hookmanager->errors);
|
||||||
if (empty($errmsg)) $errmsg = 'ErrorReturnedBySomeHooks'; // Should not occurs. Added if hook is bugged and does not set ->errors when there is error.
|
if (empty($errmsg)) $errmsg = 'ErrorReturnedBySomeHooks'; // Should not occurs. Added if hook is bugged and does not set ->errors when there is error.
|
||||||
return $errmsg;
|
return $errmsg;
|
||||||
} elseif (empty($reshook))
|
} elseif (empty($reshook)) {
|
||||||
{
|
|
||||||
// The file functions must be in OS filesystem encoding.
|
// The file functions must be in OS filesystem encoding.
|
||||||
$src_file_osencoded = dol_osencode($src_file);
|
$src_file_osencoded = dol_osencode($src_file);
|
||||||
$file_name_osencoded = dol_osencode($file_name);
|
$file_name_osencoded = dol_osencode($file_name);
|
||||||
@@ -1535,6 +1533,8 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess
|
|||||||
$nbok = 0;
|
$nbok = 0;
|
||||||
for ($i = 0; $i < $nbfile; $i++)
|
for ($i = 0; $i < $nbfile; $i++)
|
||||||
{
|
{
|
||||||
|
if (empty($TFile['name'][$i])) continue; // For example, when submitting a form with no file name
|
||||||
|
|
||||||
// Define $destfull (path to file including filename) and $destfile (only filename)
|
// Define $destfull (path to file including filename) and $destfile (only filename)
|
||||||
$destfull = $upload_dir."/".$TFile['name'][$i];
|
$destfull = $upload_dir."/".$TFile['name'][$i];
|
||||||
$destfile = $TFile['name'][$i];
|
$destfile = $TFile['name'][$i];
|
||||||
|
|||||||
@@ -1221,7 +1221,8 @@ RestoreDesc=To restore a Dolibarr backup, two steps are required.
|
|||||||
RestoreDesc2=Restore the backup file (zip file for example) of the "documents" directory to a new Dolibarr installation or into this current documents directory (<b>%s</b>).
|
RestoreDesc2=Restore the backup file (zip file for example) of the "documents" directory to a new Dolibarr installation or into this current documents directory (<b>%s</b>).
|
||||||
RestoreDesc3=Restore the database structure and data from a backup dump file into the database of the new Dolibarr installation or into the database of this current installation (<b>%s</b>). Warning, once the restore is complete, you must use a login/password, that existed from the backup time/installation to connect again.<br>To restore a backup database into this current installation, you can follow this assistant.
|
RestoreDesc3=Restore the database structure and data from a backup dump file into the database of the new Dolibarr installation or into the database of this current installation (<b>%s</b>). Warning, once the restore is complete, you must use a login/password, that existed from the backup time/installation to connect again.<br>To restore a backup database into this current installation, you can follow this assistant.
|
||||||
RestoreMySQL=MySQL import
|
RestoreMySQL=MySQL import
|
||||||
ForcedToByAModule= This rule is forced to <b>%s</b> by an activated module
|
ForcedToByAModule=This rule is forced to <b>%s</b> by an activated module
|
||||||
|
ValueIsForcedBySystem=This value is forced by the system. You can't change it.
|
||||||
PreviousDumpFiles=Existing backup files
|
PreviousDumpFiles=Existing backup files
|
||||||
PreviousArchiveFiles=Existing archive files
|
PreviousArchiveFiles=Existing archive files
|
||||||
WeekStartOnDay=First day of the week
|
WeekStartOnDay=First day of the week
|
||||||
|
|||||||
Reference in New Issue
Block a user