Merge pull request #22226 from fboitel/fboitel-dev-scrutinizer-11/09/2022
Fix scrutinizer 2
This commit is contained in:
commit
f9b5a370ab
@ -876,11 +876,12 @@ class ImportXlsx extends ModeleImports
|
|||||||
if (!empty($updatekeys)) {
|
if (!empty($updatekeys)) {
|
||||||
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
|
// We do SELECT to get the rowid, if we already have the rowid, it's to be used below for related tables (extrafields)
|
||||||
|
|
||||||
|
$where = array();
|
||||||
|
|
||||||
if (empty($lastinsertid)) { // No insert done yet for a parent table
|
if (empty($lastinsertid)) { // No insert done yet for a parent table
|
||||||
$sqlSelect = "SELECT ".$fname." FROM " . $tablename;
|
$sqlSelect = "SELECT ".$fname." FROM " . $tablename;
|
||||||
|
|
||||||
$data = array_combine($listfields, $listvalues);
|
$data = array_combine($listfields, $listvalues);
|
||||||
$where = array();
|
|
||||||
$filters = array();
|
$filters = array();
|
||||||
foreach ($updatekeys as $key) {
|
foreach ($updatekeys as $key) {
|
||||||
$col = $objimport->array_import_updatekeys[0][$key];
|
$col = $objimport->array_import_updatekeys[0][$key];
|
||||||
@ -929,6 +930,7 @@ class ImportXlsx extends ModeleImports
|
|||||||
// Note: For extrafield tablename, we have in importfieldshidden_array an enty 'extra.fk_object'=>'lastrowid-tableparent' so $keyfield is 'fk_object'
|
// Note: For extrafield tablename, we have in importfieldshidden_array an enty 'extra.fk_object'=>'lastrowid-tableparent' so $keyfield is 'fk_object'
|
||||||
$sqlSelect = "SELECT rowid FROM " . $tablename;
|
$sqlSelect = "SELECT rowid FROM " . $tablename;
|
||||||
|
|
||||||
|
|
||||||
if (empty($keyfield)) {
|
if (empty($keyfield)) {
|
||||||
$keyfield = 'rowid';
|
$keyfield = 'rowid';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -709,7 +709,7 @@ print '<br>';
|
|||||||
if (!empty($conn_id)) {
|
if (!empty($conn_id)) {
|
||||||
$disconnect = dol_ftp_close($conn_id);
|
$disconnect = dol_ftp_close($conn_id);
|
||||||
|
|
||||||
if ($disconnect == false) {
|
if (!$disconnect) {
|
||||||
setEventMessages($langs->trans("ErrorFTPNodisconnect"), null, 'errors');
|
setEventMessages($langs->trans("ErrorFTPNodisconnect"), null, 'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,6 +57,19 @@ class StockTransfer extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $isextrafieldmanaged = 1;
|
public $isextrafieldmanaged = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Customer ref
|
||||||
|
* @deprecated
|
||||||
|
* @see $ref_customer
|
||||||
|
*/
|
||||||
|
public $ref_client;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Customer ref
|
||||||
|
*/
|
||||||
|
public $ref_customer;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string String with name of icon for stocktransfer. Must be the part after the 'object_' into object_stocktransfer.png
|
* @var string String with name of icon for stocktransfer. Must be the part after the 'object_' into object_stocktransfer.png
|
||||||
*/
|
*/
|
||||||
@ -140,6 +153,7 @@ class StockTransfer extends CommonObject
|
|||||||
public $note_private;
|
public $note_private;
|
||||||
public $date_creation;
|
public $date_creation;
|
||||||
public $tms;
|
public $tms;
|
||||||
|
public $lead_time_for_warning;
|
||||||
public $fk_user_creat;
|
public $fk_user_creat;
|
||||||
public $fk_user_modif;
|
public $fk_user_modif;
|
||||||
public $import_key;
|
public $import_key;
|
||||||
|
|||||||
@ -232,7 +232,6 @@ class StockTransferLine extends CommonObjectLine
|
|||||||
|
|
||||||
// Reset some properties
|
// Reset some properties
|
||||||
unset($object->id);
|
unset($object->id);
|
||||||
unset($object->fk_user_creat);
|
|
||||||
unset($object->import_key);
|
unset($object->import_key);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -368,7 +368,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
||||||
if ($mailfile->error || $mailfile->errors) {
|
if ($mailfile->error || !empty($mailfile->errors)) {
|
||||||
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
@ -409,7 +409,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||||
$mailfile = new CMailFile($subject, $sendto, $from, $message_admin, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
$mailfile = new CMailFile($subject, $sendto, $from, $message_admin, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, -1, '', '', 'tic'.$object->id, '', 'ticket');
|
||||||
if ($mailfile->error || $mailfile->errors) {
|
if ($mailfile->error || !empty($mailfile->errors)) {
|
||||||
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
|
|||||||
@ -1654,7 +1654,7 @@ class Ticket extends CommonObject
|
|||||||
$sendtocc = '';
|
$sendtocc = '';
|
||||||
$deliveryreceipt = 0;
|
$deliveryreceipt = 0;
|
||||||
$mailfile = new CMailFile($subject, $info_sendto['email'], $from, $tmpmessage, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0);
|
$mailfile = new CMailFile($subject, $info_sendto['email'], $from, $tmpmessage, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0);
|
||||||
if ($mailfile->error || $mailfile->errors) {
|
if ($mailfile->error || !empty($mailfile->errors)) {
|
||||||
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
|
||||||
} else {
|
} else {
|
||||||
$result = $mailfile->sendfile();
|
$result = $mailfile->sendfile();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user