diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
index c0777275201..e7c07c23b4c 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -364,10 +364,10 @@ abstract class ActionsAdherentCardCommon
if ($action == 'create_user')
{
- // Full firstname and name separated with a dot : firstname.name
+ // Full firstname and lastname separated with a dot : firstname.lastname
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
- $login=dol_buildlogin($this->object->lastname, $this->object->prenom);
+ $login=dol_buildlogin($this->object->lastname, $this->object->firstname);
$generated_password=getRandomPassword('');
$password=$generated_password;
diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index 7e124e37e8a..199e2025b47 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -654,7 +654,7 @@ if ($rowid)
*/
if ($action != 'addsubscription' && $action != 'create_thirdparty')
{
- $sql = "SELECT d.rowid, d.prenom, d.lastname, d.societe,";
+ $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,";
$sql.= " c.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,";
$sql.= " c.datef,";
diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php
index 490dddbb268..fa3d50ed3d2 100755
--- a/htdocs/adherents/cartes/carte.php
+++ b/htdocs/adherents/cartes/carte.php
@@ -61,7 +61,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
$arrayofmembers=array();
// requete en prenant que les adherents a jour de cotisation
- $sql = "SELECT d.rowid, d.prenom as firstname, d.lastname, d.login, d.societe as company, d.datefin,";
+ $sql = "SELECT d.rowid, d.firstname, d.lastname, d.login, d.societe as company, d.datefin,";
$sql.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,";
$sql.= " t.libelle as type,";
$sql.= " p.code as country_code, p.libelle as country";
@@ -109,12 +109,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
'%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated
// For backward compatibility
- '%PRENOM%'=>$objp->firstname,
- '%LASTNAME%'=>$objp->lastname,
'%SOCIETE%'=>$objp->company,
- '%ADDRESS%'=>$objp->address,
'%CP%'=>$objp->zip,
- '%TOWN%'=>$objp->town,
'%PAYS%'=>$objp->country,
'%ANNEE%'=>$year,
'%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 3b348f027a5..81d746ec9c7 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -45,7 +45,6 @@ class Adherent extends CommonObject
var $ref;
var $civilite_id;
var $firstname;
- var $prenom; // deprecated
var $lastname;
var $login;
var $pass;
@@ -227,12 +226,8 @@ class Adherent extends CommonObject
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
// For backward compatibility
'%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos,
- '%PRENOM%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
- '%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
'%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
- '%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
'%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip,
- '%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
);
@@ -400,7 +395,7 @@ class Adherent extends CommonObject
// Clean parameters
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname);
- $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->prenom);
+ $this->firstname=trim($this->firstname)?trim($this->firstname):trim($this->firstname);
$this->address=($this->address?$this->address:$this->address);
$this->zip=($this->zip?$this->zip:$this->cp);
$this->town=($this->town?$this->town:$this->town);
@@ -421,7 +416,7 @@ class Adherent extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null");
- $sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
+ $sql.= ", firstname = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
$sql.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
$sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"null");
@@ -523,7 +518,6 @@ class Adherent extends CommonObject
$luser->civilite_id=$this->civilite_id;
$luser->firstname=$this->firstname;
$luser->lastname=$this->lastname;
- $luser->prenom=$this->firstname; // deprecated
$luser->login=$this->user_login;
$luser->pass=$this->pass;
$luser->societe_id=$this->societe;
@@ -1015,7 +1009,7 @@ class Adherent extends CommonObject
{
global $langs;
- $sql = "SELECT d.rowid, d.civilite, d.prenom as firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,";
+ $sql = "SELECT d.rowid, d.civilite, d.firstname, d.lastname, d.societe, d.fk_soc, d.statut, d.public, d.address, d.cp as zip, d.town, d.note,";
$sql.= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.login, d.pass,";
$sql.= " d.photo, d.fk_adherent_type, d.morphy, d.entity,";
$sql.= " d.datec as datec,";
@@ -1053,7 +1047,6 @@ class Adherent extends CommonObject
$this->ref = $obj->rowid;
$this->id = $obj->rowid;
$this->civilite_id = $obj->civilite;
- $this->prenom = $obj->firstname; // deprecated
$this->firstname = $obj->firstname;
$this->lastname = $obj->lastname;
$this->login = $obj->login;
@@ -1813,7 +1806,7 @@ class Adherent extends CommonObject
// Member
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
if ($this->lastname && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->lastname;
- if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
+ if ($this->firstname && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->firstname;
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php
index b9a02903a15..ad71332eff2 100644
--- a/htdocs/adherents/cotisations.php
+++ b/htdocs/adherents/cotisations.php
@@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu
if ($msg) print $msg.'
';
// Liste des cotisations
-$sql = "SELECT d.rowid, d.login, d.prenom as firstname, d.lastname, d.societe,";
+$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe,";
$sql.= " c.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,";
$sql.= " c.datef,";
diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php
index 589b946a52c..01c4da22ba9 100644
--- a/htdocs/adherents/document.php
+++ b/htdocs/adherents/document.php
@@ -163,7 +163,7 @@ if ($id > 0)
print '
| '; - print ''; + print ''; print ' | '; // Firstname print ''; - print ''; + print ''; print ' | '; // Other print ''; @@ -452,8 +452,8 @@ if ($object->fetch($id) >= 0) print " | ||||||
| '.$obj->email.' | '; - print ''.$obj->nom.' | '; - print ''.$obj->prenom.' | '; + print ''.$obj->lastname.' | '; + print ''.$obj->firstname.' | '; print ''.$obj->other.' | '; print '';
if (empty($obj->source_id) || empty($obj->source_type))
diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index 310a48eb935..ef2655ad80c 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -174,7 +174,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
// On choisit les mails non deja envoyes pour ce mailing (statut=0)
// ou envoyes en erreur (statut=-1)
- $sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type, mc.tag";
+ $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.source_url, mc.source_id, mc.source_type, mc.tag";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$object->id;
@@ -209,7 +209,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
$obj = $db->fetch_object($resql);
// sendto en RFC2822
- $sendto = str_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
+ $sendto = str_replace(',',' ',$obj->firstname." ".$obj->lastname)." <".$obj->email.">";
// Make substitutions on topic and body. From (AA=YY;BB=CC;...) we keep YY, CC, ...
$other=explode(';',$obj->other);
@@ -224,8 +224,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
'__CHECK_READ__' => ' | '.$fuser->lastname.' | '; print "|
| '.$langs->trans("Firstname").' | '; - print ''.$fuser->name.' | '; + print ''.$fuser->firstname.' | '; print "||||||