2
0
forked from Wavyzz/dolibarr

redo backported fix and update adherent substitution methode

This commit is contained in:
John Botella
2019-06-21 15:32:38 +02:00
parent 200b66d11f
commit ec7ebe9f39
2 changed files with 16 additions and 16 deletions

View File

@@ -216,22 +216,22 @@ class Adherent extends CommonObject
'__ID__'=>$this->id, '__ID__'=>$this->id,
'__MEMBER_ID__'=>$this->id, '__MEMBER_ID__'=>$this->id,
'__CIVILITY__'=>$this->getCivilityLabel(), '__CIVILITY__'=>$this->getCivilityLabel(),
'__FIRSTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname, '__FIRSTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->firstname):($this->firstname?$this->firstname:''),
'__LASTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname, '__LASTNAME__'=>$msgishtml?dol_htmlentitiesbr($this->lastname):($this->lastname?$this->lastname:''),
'__FULLNAME__'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs), '__FULLNAME__'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs),
'__COMPANY__'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe, '__COMPANY__'=>$msgishtml?dol_htmlentitiesbr($this->societe):($this->societe?$this->societe:''),
'__ADDRESS__'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address, '__ADDRESS__'=>$msgishtml?dol_htmlentitiesbr($this->address):($this->address?$this->address:''),
'__ZIP__'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, '__ZIP__'=>$msgishtml?dol_htmlentitiesbr($this->zip):($this->zip?$this->zip:''),
'__TOWN__'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town, '__TOWN__'=>$msgishtml?dol_htmlentitiesbr($this->town):($this->town?$this->town:''),
'__COUNTRY__'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, '__COUNTRY__'=>$msgishtml?dol_htmlentitiesbr($this->country):($this->country?$this->country:''),
'__EMAIL__'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email, '__EMAIL__'=>$msgishtml?dol_htmlentitiesbr($this->email):($this->email?$this->email:''),
'__BIRTH__'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday, '__BIRTH__'=>$msgishtml?dol_htmlentitiesbr($birthday):($birthday?$birthday:''),
'__PHOTO__'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo, '__PHOTO__'=>$msgishtml?dol_htmlentitiesbr($this->photo):($this->photo?$this->photo:''),
'__LOGIN__'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login, '__LOGIN__'=>$msgishtml?dol_htmlentitiesbr($this->login):($this->login?$this->login:''),
'__PASSWORD__'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass, '__PASSWORD__'=>$msgishtml?dol_htmlentitiesbr($this->pass):($this->pass?$this->pass:''),
'__PHONE__'=>$msgishtml?dol_htmlentitiesbr($this->phone):$this->phone, '__PHONE__'=>$msgishtml?dol_htmlentitiesbr($this->phone):($this->phone?$this->phone:''),
'__PHONEPRO__'=>$msgishtml?dol_htmlentitiesbr($this->phone_perso):$this->phone_perso, '__PHONEPRO__'=>$msgishtml?dol_htmlentitiesbr($this->phone_perso):($this->phone_perso?$this->phone_perso:''),
'__PHONEMOBILE__'=>$msgishtml?dol_htmlentitiesbr($this->phone_mobile):$this->phone_mobile, '__PHONEMOBILE__'=>$msgishtml?dol_htmlentitiesbr($this->phone_mobile):($this->phone_mobile?$this->phone_mobile:'')
); );
complete_substitutions_array($substitutionarray, $langs, $this); complete_substitutions_array($substitutionarray, $langs, $this);

View File

@@ -5733,7 +5733,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs=null)
// Make substitition for array $substitutionarray // Make substitition for array $substitutionarray
foreach ($substitutionarray as $key => $value) foreach ($substitutionarray as $key => $value)
{ {
//if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace. if (! isset($value)) continue; // If value is null, it same than not having substitution key at all into array, we do not replace.
if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection if ($key == '__SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection
if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection if ($key == '__USER_SIGNATURE__' && (! empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))) $value=''; // Protection