From 0fcdd8edad8c89422848f46b2ae86b58d5d7226f Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Mon, 27 Sep 2010 06:51:03 +0000 Subject: [PATCH] Fix: bad date format --- htdocs/adherents/cartes/carte.php | 2 +- htdocs/adherents/class/adherent.class.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 35e1dc75ba3..6d339f5eb5d 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -130,7 +130,7 @@ else '%VILLE%'=>$objp->ville, '%PAYS%'=>$objp->pays, '%EMAIL%'=>$objp->email, - '%NAISS%'=>$objp->naiss, + '%NAISS%'=>dol_print_date($objp->naiss,'day'), '%TYPE%'=>$objp->type, '%ID%'=>$objp->rowid, '%ANNEE%'=>$year, // For backward compatibility diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 3cf0cdbb027..b0b5aa59aeb 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -174,6 +174,8 @@ class Adherent extends CommonObject function makeSubstitution($text) { global $langs; + + $birthday = dol_print_date($this->naiss,'day'); $msgishtml = 0; if (dol_textishtml($text,1)) $msgishtml = 1; @@ -190,7 +192,7 @@ class Adherent extends CommonObject $infos.= $langs->transnoentities("EMail").": ".$this->email."\n"; $infos.= $langs->transnoentities("Login").": ".$this->login."\n"; $infos.= $langs->transnoentities("Password").": ".$this->pass."\n"; - $infos.= $langs->transnoentities("Birthday").": ".$this->naiss."\n"; + $infos.= $langs->transnoentities("Birthday").": ".$birthday."\n"; $infos.= $langs->transnoentities("Photo").": ".$this->photo."\n"; $infos.= $langs->transnoentities("Public").": ".yn($this->public); @@ -207,7 +209,7 @@ class Adherent extends CommonObject '%VILLE%'=>$msgishtml?dol_htmlentitiesbr($this->ville):$this->ville, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->pays):$this->pays, '%EMAIL%'=>$msgishtml?dol_htmlentitiesbr($this->email):$this->email, - '%NAISS%'=>$msgishtml?dol_htmlentitiesbr($this->naiss):$this->naiss, + '%NAISS%'=>$msgishtml?dol_htmlentitiesbr($birthday):$birthday, '%PHOTO%'=>$msgishtml?dol_htmlentitiesbr($this->photo):$this->photo, '%LOGIN%'=>$msgishtml?dol_htmlentitiesbr($this->login):$this->login, '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass -- GitLab