diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 7f2eb4a633f..485da9afc12 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1190,6 +1190,8 @@ class SMTPs $host=preg_replace('@tcp://@i','',$host); // Remove prefix $host=preg_replace('@ssl://@i','',$host); // Remove prefix + $host=dol_getprefix().'-'.$host; + //NOTE: Message-ID should probably contain the username of the user who sent the msg $_header .= 'Subject: ' . $this->getSubject() . "\r\n"; $_header .= 'Date: ' . date("r") . "\r\n"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0c4e30f7fca..25c6baec6b1 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -291,8 +291,15 @@ function GETPOST($paramname,$check='',$method=0,$filter=NULL,$options=NULL) */ function dol_getprefix() { + global $conf; + if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["DOCUMENT_ROOT"])) { + if (! empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID)) + { + if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID == 'SERVER_NAME') return $_SERVER["SERVER_NAME"]; + return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID; + } return dol_hash($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT); // Use this for a "clear" cookie name //return dol_sanitizeFileName($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].DOL_DOCUMENT_ROOT.DOL_URL_ROOT); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index d4e6c7a98fd..4f581ef755f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2014 Florian Henry - * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014-2016 Juanjo Menent * Copyright (C) 2014-2015 Philippe Grand * Copyright (C) 2014 Ion agorria * Copyright (C) 2015 Alexandre Spangaro @@ -278,8 +278,8 @@ if (empty($reshook)) { $obj = $db->fetch_object($resql); $npr = $obj->recuperableonly; - $localtax1 = $obj->localtax1; - $localtax2 = $obj->localtax2; + $localtax1 = get_localtax($tva_tx,1); + $localtax2 = get_localtax($tva_tx,2); $localtax1_type = $obj->localtax1_type; $localtax2_type = $obj->localtax2_type; }