From 290e5d8bc8611065955bb3011e2c6b479fab2e8f Mon Sep 17 00:00:00 2001 From: Vanyo Date: Wed, 3 Apr 2024 10:45:51 +0200 Subject: [PATCH 1/3] [DEBUG] Update replenish.php wrong type from $_POST --- htdocs/product/stock/replenish.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index c725a339a45..c56ab78c005 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -164,7 +164,7 @@ if ($action == 'order' && GETPOST('valid')) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $productsupplier = new ProductFournisseur($db); for ($i = 0; $i < $linecount; $i++) { - if (GETPOSTINT('choose'.$i) === 'on' && GETPOSTINT('fourn'.$i) > 0) { + if (GETPOST('choose'.$i) === 'on' && GETPOSTINT('fourn'.$i) > 0) { //one line $box = $i; $supplierpriceid = GETPOSTINT('fourn'.$i); From f624d9e07fe2ac68728f8012f05e50ceb947b81d Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 4 Apr 2024 18:49:31 +0200 Subject: [PATCH 2/3] NEW: add field Reply to in emailing --- htdocs/comm/mailing/card.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index a3d84f89d64..153431afc36 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -360,7 +360,7 @@ if (empty($reshook)) { // Mail making $trackid = 'emailing-'.$obj->fk_mailing.'-'.$obj->rowid; $upload_dir_tmp = $upload_dir; - $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', '', $upload_dir_tmp); + $mail = new CMailFile($newsubject, $sendto, $from, $newmessage, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $errorsto, $arr_css, $trackid, $moreinheader, 'emailing', $replyto, $upload_dir_tmp); if ($mail->error) { $res = 0; @@ -580,7 +580,7 @@ if (empty($reshook)) { } // Action update description of emailing - if ($action == 'settitle' || $action == 'setemail_from' || $action == 'setreplyto' || $action == 'setemail_errorsto' || $action == 'setevenunsubscribe') { + if ($action == 'settitle' || $action == 'setemail_from' || $action == 'setemail_replyto' || $action == 'setreplyto' || $action == 'setemail_errorsto' || $action == 'setevenunsubscribe') { $upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing'); if ($action == 'settitle') { @@ -1076,6 +1076,23 @@ if ($action == 'create') { print ''; } + // Errors to + if ($object->messtype != 'sms') { + print ''; + print $form->editfieldkey("MailReply", 'email_replyto', $object->email_replyto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string'); + print ''; + print $form->editfieldval("MailReply", 'email_replyto', $object->email_replyto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string'); + $email = CMailFile::getValidAddress($object->email_replyto, 2); + if ($email && !isValidEmail($email)) { + $langs->load("errors"); + print img_warning($langs->trans("ErrorBadEMail", $email)); + } elseif ($email && !isValidMailDomain($email)) { + $langs->load("errors"); + print img_warning($langs->trans("ErrorBadMXDomain", $email)); + } + print ''; + } + print ''; print ''; From 13cb7b590a4b4118f9416c6a77ce79d2fbf516f9 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 4 Apr 2024 18:51:03 +0200 Subject: [PATCH 3/3] NEW: add field Reply to in emailing --- htdocs/comm/mailing/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 153431afc36..1151f70014d 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1076,7 +1076,7 @@ if ($action == 'create') { print ''; } - // Errors to + // Reply to if ($object->messtype != 'sms') { print ''; print $form->editfieldkey("MailReply", 'email_replyto', $object->email_replyto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string');