From f94ba084a3e616b21ca39909bc3be2ae8f8509a7 Mon Sep 17 00:00:00 2001 From: Chl Date: Mon, 19 Aug 2024 23:39:29 +0200 Subject: [PATCH] Disable Dolibarr filter on email addresses and subject 'was wondering if the filter change of Dolibarr 13 might have affected something else and, well, yes... So, following e1ac0a6d69f0d5913bf74c8bdbebfff0bbecd72a, we also disable the filter for the email addresses, else we get something like "Webmaster " becoming "Webmaster". --- fiche-rec-tab1.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fiche-rec-tab1.php b/fiche-rec-tab1.php index 4efce12..69fcb98 100644 --- a/fiche-rec-tab1.php +++ b/fiche-rec-tab1.php @@ -103,7 +103,7 @@ do { if (GETPOST('save')) { do { // Validate input data - if (! array_key_exists(GETPOST('fromtype', 'alpha'), $listFrom)) { + if (! array_key_exists(GETPOST('fromtype'), $listFrom)) { setEventMessages('Unexpected from value', null, 'errors'); break; } @@ -116,13 +116,13 @@ do { break; } // Validate some non-breaking stuff after feeding - if (empty(GETPOST('sendto_free', 'alpha')) && empty(GETPOST('sendto_socpeople', 'array'))) { + if (empty(GETPOST('sendto_free', 'none')) && empty(GETPOST('sendto_socpeople', 'array'))) { // Kinda weird behaviour from CMailFile but better alert the user beforehand // FIXME: check if there is a workaround ? setEventMessages("In some configuration, CMailFile doesn't allow empty 'to' recipient. You should set at least one.", null, 'warnings'); //break; } - if (! strlen(GETPOST('subject', 'alpha'))) { + if (! strlen(GETPOST('subject', 'none'))) { // Kinda weird behaviour from CMailFile but better alert the user beforehand // FIXME: check if there is a workaround ? setEventMessages("In some configuration, CMailFile doesn't allow empty subject. You should set one.", null, 'warnings'); @@ -140,10 +140,10 @@ do { $mailObject->fromtype = GETPOST('fromtype', 'alpha'); $mailObject->frommail = $listFrom[$mailObject->fromtype]; - $mailObject->sendto_free = GETPOST('sendto_free', 'alpha'); + $mailObject->sendto_free = GETPOST('sendto_free', 'none'); $mailObject->sendto_thirdparty = in_array('thirdparty', GETPOST('sendto_socpeople', 'array')); - $mailObject->sendcc_free = GETPOST('sendcc_free', 'alpha'); + $mailObject->sendcc_free = GETPOST('sendcc_free', 'none'); $mailObject->sendcc_thirdparty = in_array('thirdparty', GETPOST('sendcc_socpeople', 'array')); $mailObject->subject = GETPOST('subject', 'none');