From 43b4ebdd23655273220044c65c2e3816512a9500 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 27 Sep 2010 06:58:44 +0000 Subject: [PATCH] Fix: bad date format Fix: utf8 --- htdocs/adherents/cartes/carte.php | 6 ++--- htdocs/adherents/class/adherent.class.php | 32 ++++++++++++----------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index 164c6ad44ff..929e34c1b8d 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -20,13 +20,13 @@ /** * \file htdocs/adherents/cartes/carte.php - * \ingroup adherent + * \ingroup member * \brief Page to output members business cards * \version $Id$ */ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php"); -require_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); +require_once(DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/member/cards/modules_cards.php"); @@ -94,7 +94,7 @@ if ($result) $objp->ville, $objp->pays, $objp->email, - $objp->naiss, + dol_print_date($objp->naiss,'day'), $objp->type, $objp->rowid, $year, diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index d16f02a79e7..d19e00572db 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -145,6 +145,8 @@ class Adherent extends CommonObject $addr_cc="",$addr_bcc="",$deliveryreceipt=0,$msgishtml=-1, $errors_to='') { global $conf,$langs; + + $birthday = dol_print_date($this->naiss,'day'); // Detect if message is HTML if ($msgishtml == -1) @@ -154,20 +156,20 @@ class Adherent extends CommonObject } $infos=''; - if ($this->civilite_id) $infos.= $langs->trans("UserTitle").": ".$this->getCivilityLabel()."\n"; - $infos.= $langs->trans("Lastname").": $this->nom\n"; - $infos.= $langs->trans("Firstname").": $this->prenom\n"; - $infos.= $langs->trans("Company").": $this->societe\n"; - $infos.= $langs->trans("Address").": $this->adresse\n"; - $infos.= $langs->trans("Zip").": $this->cp\n"; - $infos.= $langs->trans("Town").": $this->ville\n"; - $infos.= $langs->trans("Country").": $this->pays\n"; - $infos.= $langs->trans("EMail").": $this->email\n"; - $infos.= $langs->trans("Login").": $this->login\n"; - $infos.= $langs->trans("Password").": $this->pass\n"; - $infos.= $langs->trans("Birthday").": $this->naiss\n"; - $infos.= $langs->trans("Photo").": $this->photo\n"; - $infos.= $langs->trans("Public").": ".yn($this->public)."\n"; + if ($this->civilite_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel()."\n"; + $infos.= $langs->transnoentities("Lastname").": $this->nom\n"; + $infos.= $langs->transnoentities("Firstname").": $this->prenom\n"; + $infos.= $langs->transnoentities("Company").": $this->societe\n"; + $infos.= $langs->transnoentities("Address").": $this->adresse\n"; + $infos.= $langs->transnoentities("Zip").": $this->cp\n"; + $infos.= $langs->transnoentities("Town").": $this->ville\n"; + $infos.= $langs->transnoentities("Country").": $this->pays\n"; + $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").": $birthday\n"; + $infos.= $langs->transnoentities("Photo").": $this->photo\n"; + $infos.= $langs->transnoentities("Public").": ".yn($this->public)."\n"; if ($msgishtml) $infos = dol_htmlentitiesbr($infos); // Substitutions @@ -200,7 +202,7 @@ class Adherent extends CommonObject $this->ville, $this->pays, $this->email, - $this->naiss, + $birthday, $this->photo, $this->login, $this->pass