diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f74b61d07c6..bc71e961fb1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1978,13 +1978,13 @@ if ($action == 'create' && $usercancreate) { print ''; print ''; $incoterm_id = GETPOST('incoterm_id'); - $incoterm_location = GETPOST('location_incoterms'); + $location_incoterms = GETPOST('location_incoterms'); if (empty($incoterm_id)) { $incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms); - $incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms); + $location_incoterms = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms); } print img_picto('', 'incoterm', 'class="pictofixedwidth"'); - print $form->select_incoterms($incoterm_id, $incoterm_location); + print $form->select_incoterms($incoterm_id, $location_incoterms); print ''; } diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 7ef137de862..4ccff71443f 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -189,10 +189,10 @@ if ($action == 'add' && $user->hasRight('banque', 'transfer')) { $error++; } if (!$error) { - $mesgs = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount[$n], $langs->transnoentitiesnoconv("Currency".$conf->currency)); - $mesgs = str_replace('{s1}', ''.$tmpaccountfrom->label.'', $mesgs); - $mesgs = str_replace('{s2}', ''.$tmpaccountto->label.'', $mesgs); - setEventMessages($mesgs, null, 'mesgs'); + $mesg = $langs->trans("TransferFromToDone", '{s1}', '{s2}', $amount[$n], $langs->transnoentitiesnoconv("Currency".$conf->currency)); + $mesg = str_replace('{s1}', ''.$tmpaccountfrom->label.'', $mesgs); + $mesg = str_replace('{s2}', ''.$tmpaccountto->label.'', $mesgs); + setEventMessages($mesg, null, 'mesgs'); } else { $error++; setEventMessages($tmpaccountfrom->error.' '.$tmpaccountto->error, null, 'errors'); diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 1b81458ffbf..9735e5d4571 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -440,9 +440,9 @@ class FormMail extends Form if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) { if (!empty($arraydefaultmessage->joinfiles) && !empty($this->param['fileinit']) && is_array($this->param['fileinit'])) { - foreach ($this->param['fileinit'] as $file) { - if (!empty($file)) { - $this->add_attached_files($file, basename($file), dol_mimetype($file)); + foreach ($this->param['fileinit'] as $path) { + if (!empty($path)) { + $this->add_attached_files($path); } } } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index c4012a96276..29b956c9d7a 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -292,7 +292,7 @@ function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $s } // Sort the data if ($sortorder) { - array_multisort($myarray, $sortorder, $file_list); + array_multisort($myarray, $sortorder, SORT_REGULAR, $file_list); } }