mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Fix: Bad space in predefined messages.
Fix: Signature was not added for email sent from thirdparty page.
This commit is contained in:
@@ -76,7 +76,7 @@ class FormMail
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
function __construct($db)
|
||||
{
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->withform=1;
|
||||
@@ -554,7 +554,8 @@ class FormMail
|
||||
elseif ($this->param["models"]=='invoice_supplier_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendSupplierInvoice"); }
|
||||
elseif ($this->param["models"]=='shipping_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendShipping"); }
|
||||
elseif ($this->param["models"]=='fichinter_send') { $defaultmessage=$langs->transnoentities("PredefinedMailContentSendFichInter"); }
|
||||
elseif (! is_numeric($this->withbody)) { $defaultmessage=$this->withbody; }
|
||||
elseif ($this->param["models"]=='thirdparty') { $defaultmessage=$langs->transnoentities("PredefinedMailContentThirdparty"); }
|
||||
elseif (! is_numeric($this->withbody)) { $defaultmessage=$this->withbody; }
|
||||
|
||||
// Complete substitution array
|
||||
if (! empty($conf->paypal->enabled) && ! empty($conf->global->PAYPAL_ADD_PAYMENT_URL))
|
||||
@@ -576,14 +577,14 @@ class FormMail
|
||||
}
|
||||
|
||||
$defaultmessage=str_replace('\n',"\n",$defaultmessage);
|
||||
|
||||
|
||||
// Deal with format differences between message and signature (text / HTML)
|
||||
if(dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) {
|
||||
$this->substit['__SIGNATURE__'] = dol_nl2br($this->substit['__SIGNATURE__']);
|
||||
} else if(!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__SIGNATURE__'])) {
|
||||
$defaultmessage = dol_nl2br($defaultmessage);
|
||||
}
|
||||
|
||||
|
||||
$defaultmessage=make_substitutions($defaultmessage,$this->substit);
|
||||
if (isset($_POST["message"])) $defaultmessage=$_POST["message"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user