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 ''.$langs->trans("Lastname").''.$member->lastname.' '; print ''; - // Prenom + // Firstname print ''.$langs->trans("Firstname").''.$member->firstname.' '; print ''; diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 1915f260f69..79d41e3525f 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -251,8 +251,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) // Change values $object->civilite_id = trim($_POST["civilite_id"]); - $object->prenom = trim($_POST["prenom"]); // deprecated - $object->firstname = trim($_POST["prenom"]); + $object->firstname = trim($_POST["firstname"]); $object->lastname = trim($_POST["lastname"]); $object->login = trim($_POST["login"]); $object->pass = trim($_POST["pass"]); @@ -408,7 +407,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $typeid=$_POST["typeid"]; $civilite_id=$_POST["civilite_id"]; $lastname=$_POST["lastname"]; - $prenom=$_POST["prenom"]; + $firstname=$_POST["firstname"]; $societe=$_POST["societe"]; $address=$_POST["address"]; $zip=$_POST["zipcode"]; @@ -432,8 +431,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $socid=$_POST["socid"]; $object->civilite_id = $civilite_id; - $object->prenom = $prenom; // deprecated - $object->firstname = $prenom; + $object->firstname = $firstname; $object->lastname = $lastname; $object->societe = $societe; $object->address = $address; @@ -502,7 +500,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."
\n"; } - if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) { + if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) { $error++; $langs->load("errors"); $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."
\n"; @@ -821,7 +819,7 @@ else print ''; // Firstname - print ''.$langs->trans("Firstname").''; + print ''.$langs->trans("Firstname").''; print ''; // Password @@ -1078,7 +1076,7 @@ else print ''; // Firstname - print ''.$langs->trans("Firstname").'firstname).'">'; + print ''.$langs->trans("Firstname").'firstname).'">'; print ''; // Password diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 263e25fc4ec..9e86de34c58 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -205,7 +205,7 @@ $var=true; */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " a.tms as datem, datefin as date_end_subscription,"; $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; @@ -265,7 +265,7 @@ else */ $max=5; -$sql = "SELECT a.rowid, a.statut, a.lastname, a.prenom as firstname, a.societe as company, a.fk_soc,"; +$sql = "SELECT a.rowid, a.statut, a.lastname, a.firstname, a.societe as company, a.fk_soc,"; $sql.= " datefin as date_end_subscription,"; $sql.= " c.rowid as cid, c.tms as datem, c.datec as datec, c.dateadh as date_start, c.datef as date_end, c.cotisation"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c"; diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 7d22a417ba7..86667b20122 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -108,11 +108,11 @@ print ''; print $form->showrefnav($adh,'id'); print ''; -// Nom +// Lastname print ''.$langs->trans("Lastname").''.$adh->lastname.' '; print ''; -// Prenom +// Firstname print ''.$langs->trans("Firstname").''.$adh->firstname.' '; print ''; diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index 3332e4f8334..8bab0cab35b 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -40,7 +40,7 @@ $statut=GETPOST("statut"); $search=GETPOST("search"); $search_ref=GETPOST("search_ref"); $search_lastname=GETPOST("search_lastname"); -$search_prenom=GETPOST("search_prenom"); +$search_firstname=GETPOST("search_firstname"); $search_login=GETPOST("search_login"); $type=GETPOST("type"); $search_email=GETPOST("search_email"); @@ -63,7 +63,7 @@ if (GETPOST("button_removefilter")) $search=""; $search_ref=""; $search_lastname=""; - $search_prenom=""; + $search_firstname=""; $search_login=""; $type=""; $search_email=""; @@ -86,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé $now=dol_now(); -$sql = "SELECT d.rowid, d.login, d.lastname, d.prenom as firstname, d.societe as company, d.fk_soc,"; +$sql = "SELECT d.rowid, d.login, d.lastname, d.firstname, d.societe as company, d.fk_soc,"; $sql.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -103,7 +103,7 @@ if ($sall) { $sql.=" AND ("; if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; - $sql.=" d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.=" d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.=" OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -122,7 +122,7 @@ if ($search_ref) } if ($search_lastname) { - $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if ($search_login) { diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 4734679131e..f4a60f55cd9 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -405,7 +405,7 @@ if ($rowid > 0) $now=dol_now(); - $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.= " d.datefin,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " t.libelle as type, t.cotisation"; @@ -415,7 +415,7 @@ if ($rowid > 0) $sql.= " AND t.rowid = ".$adht->id; if ($sall) { - $sql.= " AND (d.prenom LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; + $sql.= " AND (d.firstname LIKE '%".$sall."%' OR d.lastname LIKE '%".$sall."%' OR d.societe LIKE '%".$sall."%'"; $sql.= " OR d.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'"; $sql.= " OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; } @@ -427,12 +427,12 @@ if ($rowid > 0) { if (isset($_POST['search']) && $_POST['search'] != '') { - $sql.= " AND (d.prenom LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')"; + $sql.= " AND (d.firstname LIKE '%".$_POST['search']."%' OR d.lastname LIKE '%".$_POST['search']."%')"; } } if (! empty($search_lastname)) { - $sql.= " AND (d.prenom LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; + $sql.= " AND (d.firstname LIKE '%".$search_lastname."%' OR d.lastname LIKE '%".$search_lastname."%')"; } if (! empty($search_login)) { @@ -493,7 +493,7 @@ if ($rowid > 0) $param="&rowid=".$rowid; if (! empty($status)) $param.="&status=".$status; if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; - if (! empty($search_firstname)) $param.="&search_prenom=".$search_firstname; + if (! empty($search_firstname)) $param.="&search_firstname=".$search_firstname; if (! empty($search_login)) $param.="&search_login=".$search_login; if (! empty($search_email)) $param.="&search_email=".$search_email; if (! empty($filter)) $param.="&filter=".$filter; diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index cd35bc02174..b6dc3cb2046 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -94,8 +94,8 @@ if ( $retour >= 0 ) $_SESSION['uid'] = $tab['rowid']; $_SESSION['uname'] = $username; - $_SESSION['nom'] = $tab['name']; - $_SESSION['prenom'] = $tab['firstname']; + $_SESSION['lastname'] = $tab['lastname']; + $_SESSION['firstname'] = $tab['firstname']; $_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid; $_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid; $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : ''); diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index e43c8527e23..59800fb57c1 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -66,7 +66,7 @@ print ''; // Disconnect -print '