From 4dd740fe2f4bb1f8da072180b3da731b0809dc62 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 13 Dec 2016 11:41:26 +0100 Subject: [PATCH 1/4] FIX : wrong test on dict.php --- htdocs/admin/dict.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index bef8c6951bf..cae081e55e3 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1292,8 +1292,6 @@ if ($id) } else if ($fieldlist[$field]=='taux') { $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); - if ($obj->localtax1 == 0) - $valuetoshow = ''; $align="right"; } else if (in_array($fieldlist[$field],array('recuperableonly'))) From 1f1c75adfb627d6e48543959ee8804bd84241359 Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 14 Dec 2016 15:50:50 +0100 Subject: [PATCH 2/4] FIX : HT and TTC price should always be displayed together --- htdocs/product/price.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 88c6c3e57b1..3be258f4243 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1269,14 +1269,14 @@ if ($result) } else { - print '' . ($objp->price_base_type != 'TTC' ? price($objp->price) : ''). ""; - print '' . ($objp->price_base_type == 'TTC' ? price($objp->price_ttc) : '') . ""; + print '' . price($objp->price). ""; + print '' . price($objp->price_ttc) . ""; if (! empty($conf->dynamicprices->enabled)) { //Only if module is enabled print ''; } } - print '' . ($objp->price_base_type != 'TTC' ? price($objp->price_min) : '') . ''; - print '' . ($objp->price_base_type == 'TTC' ? price($objp->price_min_ttc) : '') . ''; + print '' . price($objp->price_min) . ''; + print '' . price($objp->price_min_ttc) . ''; // User print '' . img_object($langs->trans("ShowUser"), 'user') . ' ' . $objp->login . ''; From dbf96b8f5977fa44b2f268d0827fa8383fb7a96e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Dec 2016 23:32:31 +0100 Subject: [PATCH 3/4] Log at wrong place --- htdocs/core/class/CMailFile.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index bd803ca3851..ba4eb1ad017 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -441,8 +441,6 @@ class CMailFile } else { - dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port'), LOG_DEBUG); - $bounce = ''; // By default if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F)) { @@ -455,7 +453,8 @@ class CMailFile { $bounce .= ($bounce?' ':'').'-ba'; } - + dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG); + $this->message=stripslashes($this->message); if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); From 74e00c4d803a4da3e21c345445aac3b95db19243 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Dec 2016 01:04:17 +0100 Subject: [PATCH 4/4] More comment and hidden option to solve problems when sending emails. --- htdocs/core/class/CMailFile.class.php | 7 +++++-- htdocs/core/class/smtps.class.php | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index ba4eb1ad017..a7c9b0a0e56 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -143,6 +143,8 @@ class CMailFile $this->msgishtml = $msgishtml; } + if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html. + // Detect images if ($this->msgishtml) { @@ -822,8 +824,9 @@ class CMailFile $strContent = preg_replace("/\r\n/si", "\n", $strContent); } - //$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems bugged - $strContent = rtrim(wordwrap($strContent)); + // Make RFC2045 Compliant, split lines + //$strContent = rtrim(chunk_split($strContent)); // Function chunck_split seems ko if not used on a base64 content + $strContent = rtrim(wordwrap($strContent)); // TODO Using this method creates unexpected line break on text/plain content. if ($this->msgishtml) { diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 6731b46fe0f..91efd218de1 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1188,7 +1188,9 @@ class SMTPs // Make RFC821 Compliant, replace bare linefeeds $strContent = preg_replace("/(?_msgContent[$strType] = array();