Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0

Conflicts:
	htdocs/core/class/utils.class.php
	htdocs/core/lib/files.lib.php
This commit is contained in:
Laurent Destailleur 2020-05-01 21:03:16 +02:00
commit b41b22996f
4 changed files with 13 additions and 20 deletions

View File

@ -221,6 +221,7 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<div class="formelementrow"><input type="checkbox"
name="use_transaction" value="yes" id="checkbox_use_transaction" /> <label
for="checkbox_use_transaction"> <?php echo $langs->trans("UseTransactionnalMode"); ?></label>
</div>
<?php if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?>
@ -243,14 +244,6 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
<option value="ORACLE">ORACLE</option>
<option value="POSTGRESQL">POSTGRESQL</option>
</select> <br>
<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" />
<label for="checkbox_use_quick">
<?php echo $form->textwithpicto(
$langs->trans('ExportUseMySQLQuickParameter'),
$langs->trans('ExportUseMySQLQuickParameterHelp')
); ?>
</label>
<br/>
<!-- <input type="checkbox" name="drop_database" value="yes"
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
-->

View File

@ -262,7 +262,6 @@ class Utils
if (GETPOST("disable_fk", "alpha") || $usedefault) $param.=" -K";
if (GETPOST("sql_compat", "alpha") && GETPOST("sql_compat", "alpha") != 'NONE') $param.=" --compatible=".escapeshellarg(GETPOST("sql_compat", "alpha"));
if (GETPOST("drop_database", "alpha")) $param.=" --add-drop-database";
if (GETPOST("use_mysql_quick_param", "alpha"))$param.=" --quick";
if (GETPOST("sql_structure", "alpha") || $usedefault)
{
if (GETPOST("drop", "alpha") || $usedefault) $param.=" --add-drop-table=TRUE";

View File

@ -959,18 +959,18 @@ function dol_unescapefile($filename)
*/
function dolCheckVirus($src_file)
{
global $conf, $db;
global $conf;
if (! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
{
if (! class_exists('AntiVir')) {
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);
if ($result < 0) // If virus or error, we stop here
{
$reterrors = $antivir->errors;
$reterrors=$antivir->errors;
return $reterrors;
}
}
@ -1853,15 +1853,16 @@ function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '', $page = ''
if (empty($fileoutput)) $fileoutput=$fileinput.".".$ext;
$count = $image->getNumberImages();
if (! dol_is_file($fileoutput) || is_writeable($fileoutput))
{
try {
$ret = $image->writeImages($fileoutput, true);
}
catch(Exception $e)
{
dol_syslog($e->getMessage(), LOG_WARNING);
}
try {
$ret = $image->writeImages($fileoutput, true);
}
catch(Exception $e)
{
dol_syslog($e->getMessage(), LOG_WARNING);
}
}
else
{

View File

@ -388,7 +388,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
//var_dump($expedition->linkedObjects);
$receiving='';
if (count($expedition->linkedObjects['delivery']) > 0) $receiving=reset($expedition->linkedObjects['delivery']); // Take first link
if (!empty($expedition->linkedObjects['delivery'])) $receiving=reset($expedition->linkedObjects['delivery']); // Take first link
if (! empty($receiving))
{