Fix: Third party emails must not be visible into notification page
This commit is contained in:
parent
97df093641
commit
c938a6b8eb
@ -381,7 +381,7 @@ class FormMail
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
$soc->fetch($this->withtosocid);
|
$soc->fetch($this->withtosocid);
|
||||||
foreach ($soc->thirdparty_and_contact_email_array() as $key=>$value)
|
foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||||
{
|
{
|
||||||
$liste[$key]=$value;
|
$liste[$key]=$value;
|
||||||
}
|
}
|
||||||
@ -415,7 +415,7 @@ class FormMail
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
$soc->fetch($this->withtoccsocid);
|
$soc->fetch($this->withtoccsocid);
|
||||||
foreach ($soc->thirdparty_and_contact_email_array() as $key=>$value)
|
foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||||
{
|
{
|
||||||
$liste[$key]=$value;
|
$liste[$key]=$value;
|
||||||
}
|
}
|
||||||
@ -449,7 +449,7 @@ class FormMail
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
$soc=new Societe($this->db);
|
$soc=new Societe($this->db);
|
||||||
$soc->fetch($this->withtosocid);
|
$soc->fetch($this->withtosocid);
|
||||||
foreach ($soc->thirdparty_and_contact_email_array() as $key=>$value)
|
foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value)
|
||||||
{
|
{
|
||||||
$liste[$key]=$value;
|
$liste[$key]=$value;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -194,7 +194,7 @@ else
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
# If failed, we try to create an empty file
|
# If failed, we try to create an empty file
|
||||||
dolibarr_install_syslog("failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.");
|
dolibarr_install_syslog("failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.", LOG_WARNING);
|
||||||
|
|
||||||
$fp = @fopen($conffile, "w");
|
$fp = @fopen($conffile, "w");
|
||||||
if ($fp)
|
if ($fp)
|
||||||
@ -204,6 +204,7 @@ else
|
|||||||
@fputs($fp,"?>");
|
@fputs($fp,"?>");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
else dolibarr_install_syslog("failed to create a new file ".$conffile." into current dir ".getcwd().". Check permission.", LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// First install, on ne peut pas upgrader
|
// First install, on ne peut pas upgrader
|
||||||
|
|||||||
@ -1527,14 +1527,16 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of contacts emails existing for third party
|
* Return list of contacts emails existing for third party
|
||||||
|
*
|
||||||
|
* @param int $addthirdparty 1=Add also a record for thirdparty email
|
||||||
* @return array Array of contacts emails
|
* @return array Array of contacts emails
|
||||||
*/
|
*/
|
||||||
function thirdparty_and_contact_email_array()
|
function thirdparty_and_contact_email_array($addthirdparty=0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$contact_emails = $this->contact_property_array('email');
|
$contact_emails = $this->contact_property_array('email');
|
||||||
if ($this->email)
|
if ($this->email && $addthirdparty)
|
||||||
{
|
{
|
||||||
if (empty($this->name)) $this->name=$this->nom;
|
if (empty($this->name)) $this->name=$this->nom;
|
||||||
// TODO: Tester si email non deja present dans tableau contact
|
// TODO: Tester si email non deja present dans tableau contact
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user