Skip to content

Commit

Permalink
Fix: Third party emails must not be visible into notification page
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 2, 2011
1 parent 97df093 commit c938a6b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions htdocs/core/class/html.formmail.class.php
Expand Up @@ -381,7 +381,7 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
$liste=array();
$soc=new Societe($this->db);
$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;
}
Expand Down Expand Up @@ -415,7 +415,7 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
$liste=array();
$soc=new Societe($this->db);
$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;
}
Expand Down Expand Up @@ -449,7 +449,7 @@ function get_form($addfileaction='addfile',$removefileaction='removefile')
$liste=array();
$soc=new Societe($this->db);
$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;
}
Expand Down
3 changes: 2 additions & 1 deletion htdocs/install/check.php
Expand Up @@ -194,7 +194,7 @@
else
{
# 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");
if ($fp)
Expand All @@ -204,6 +204,7 @@
@fputs($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
Expand Down
8 changes: 5 additions & 3 deletions htdocs/societe/class/societe.class.php
Expand Up @@ -1527,14 +1527,16 @@ function getFullAddress($withcountry=0,$sep="\n")

/**
* Return list of contacts emails existing for third party
* @return array Array of contacts emails
*
* @param int $addthirdparty 1=Add also a record for thirdparty email
* @return array Array of contacts emails
*/
function thirdparty_and_contact_email_array()
function thirdparty_and_contact_email_array($addthirdparty=0)
{
global $langs;

$contact_emails = $this->contact_property_array('email');
if ($this->email)
if ($this->email && $addthirdparty)
{
if (empty($this->name)) $this->name=$this->nom;
// TODO: Tester si email non deja present dans tableau contact
Expand Down

0 comments on commit c938a6b

Please sign in to comment.