';
// 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 '
';
@@ -811,9 +811,9 @@ else
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';
- $login=dol_buildlogin($object->nom,$object->prenom);
+ $login=dol_buildlogin($object->lastname,$object->firstname);
$generated_password='';
if (! $ldap_sid) // TODO ldap_sid ?
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index fe0187624fe..50853260350 100755
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -35,8 +35,8 @@ $contactid = GETPOST('id','int');
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $contactid,'');
-$search_nom=GETPOST("search_nom");
-$search_prenom=GETPOST("search_prenom");
+$search_lastname=GETPOST("search_lastname");
+$search_firstname=GETPOST("search_firstname");
$search_societe=GETPOST("search_societe");
$search_poste=GETPOST("search_poste");
$search_phone=GETPOST("search_phone");
@@ -87,8 +87,8 @@ if (! empty($text)) $titre.= " $text";
if (GETPOST('button_removefilter'))
{
- $search_nom="";
- $search_prenom="";
+ $search_lastname="";
+ $search_firstname="";
$search_societe="";
$search_poste="";
$search_phone="";
@@ -142,13 +142,13 @@ else
if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")";
}
-if ($search_nom) // filtre sur le nom
+if ($search_lastname) // filtre sur le nom
{
- $sql .= " AND p.name LIKE '%".$db->escape($search_nom)."%'";
+ $sql .= " AND p.name LIKE '%".$db->escape($search_lastname)."%'";
}
-if ($search_prenom) // filtre sur le prenom
+if ($search_firstname) // filtre sur le prenom
{
- $sql .= " AND p.firstname LIKE '%".$db->escape($search_prenom)."%'";
+ $sql .= " AND p.firstname LIKE '%".$db->escape($search_firstname)."%'";
}
if ($search_societe) // filtre sur la societe
{
@@ -233,7 +233,7 @@ if ($result)
$contactstatic=new Contact($db);
$param ='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
- $param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_nom='.urlencode($search_nom).'&search_prenom='.urlencode($search_prenom).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
+ $param.='&type='.urlencode($type).'&view='.urlencode($view).'&search_lastname='.urlencode($search_lastname).'&search_firstname='.urlencode($search_firstname).'&search_societe='.urlencode($search_societe).'&search_email='.urlencode($search_email);
if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv);
$num = $db->num_rows($result);
@@ -279,10 +279,10 @@ if ($result)
// Ligne des champs de filtres
print '
';
print '
';
- print '';
+ print '';
print '
';
print '
';
- print '';
+ print '';
print '
';
print '
';
print '';
diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php
index 1692abffe0a..7add5a76939 100755
--- a/htdocs/core/boxes/box_members.php
+++ b/htdocs/core/boxes/box_members.php
@@ -78,7 +78,7 @@ class box_members extends ModeleBoxes
if ($user->rights->societe->lire)
{
- $sql = "SELECT a.rowid, a.nom as lastname, a.prenom as firstname, a.societe as company, a.fk_soc,";
+ $sql = "SELECT a.rowid, a.lastname, a.firstname, a.societe as company, a.fk_soc,";
$sql.= " a.datec, a.tms, a.statut as status, a.datefin as date_end_subscription,";
$sql.= " t.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as t";
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index a9337c87b8b..fd8e38ae3c4 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -85,8 +85,8 @@ class CMailFile
* CMailFile
*
* @param string $subject Topic/Subject of mail
- * @param string $to Recipients emails (RFC 2822: "Nom prenom [, ...]" ou "email[, ...]" ou "[, ...]")
- * @param string $from Sender email (RFC 2822: "Nom prenom [, ...]" ou "email[, ...]" ou "[, ...]")
+ * @param string $to Recipients emails (RFC 2822: "Nom firstname [, ...]" ou "email[, ...]" ou "[, ...]")
+ * @param string $from Sender email (RFC 2822: "Nom firstname [, ...]" ou "email[, ...]" ou "[, ...]")
* @param string $msg Message
* @param array $filename_list List of files to attach (full path of filename on file system)
* @param array $mimetype_list List of MIME type of attached files
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 8184e186999..764eb19b66e 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -64,7 +64,7 @@ abstract class CommonObject
$lastname=$this->lastname;
$firstname=$this->firstname;
if (empty($lastname)) $lastname=($this->name?$this->name:$this->nom);
- if (empty($firstname)) $firstname=$this->prenom;
+ if (empty($firstname)) $firstname=$this->firstname;
$ret='';
if ($option && $this->civilite_id)
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 0d0c0ae3f12..76dcc96197f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1005,7 +1005,7 @@ class Form
$out='';
// On recherche les utilisateurs
- $sql = "SELECT DISTINCT u.rowid, u.name as lastname, u.firstname, u.login, u.admin, u.entity";
+ $sql = "SELECT DISTINCT u.rowid, u.lastname as lastname, u.firstname, u.login, u.admin, u.entity";
if (! empty($conf->multicompany->enabled) && $conf->entity == 1 && $user->admin && ! $user->entity)
{
$sql.= ", e.label";
@@ -1033,7 +1033,7 @@ class Form
if (! empty($user->societe_id)) $sql.= " AND u.fk_societe = ".$user->societe_id;
if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN ('".$excludeUsers."')";
if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')";
- $sql.= " ORDER BY u.name ASC";
+ $sql.= " ORDER BY u.lastname ASC";
dol_syslog(get_class($this)."::select_dolusers sql=".$sql);
$resql=$this->db->query($sql);
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index d07360a3503..e5c1f2e6a2f 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -299,7 +299,7 @@ class FormOther
$moreforfilter.='';
// Get list of users allowed to be viewed
- $sql_usr = "SELECT u.rowid, u.name as name, u.firstname, u.login";
+ $sql_usr = "SELECT u.rowid, u.lastname as name, u.firstname, u.login";
$sql_usr.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql_usr.= " WHERE u.entity IN (0,".$conf->entity.")";
if (empty($user->rights->user->user->lire)) $sql_usr.=" AND u.fk_societe = ".($user->societe_id?$user->societe_id:0);
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 95827872bb7..6dbb0333720 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -769,7 +769,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
$sql.= " a.fk_element, a.elementtype,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.login, u.rowid";
- if (get_class($object) == 'Adherent') $sql.= ", m.nom as name, m.prenom as firstname";
+ if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname";
if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a";
if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
@@ -908,7 +908,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
$sql.= " a.fk_user_author, a.fk_contact,";
$sql.= " c.code as acode, c.libelle,";
$sql.= " u.login, u.rowid as user_id";
- if (get_class($object) == 'Adherent') $sql.= ", m.nom as name, m.prenom as firstname";
+ if (get_class($object) == 'Adherent') $sql.= ", m.lastname, m.firstname";
if (get_class($object) == 'Societe') $sql.= ", sp.name, sp.firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a";
if (get_class($object) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php
index 15897683c55..fda48271159 100644
--- a/htdocs/core/modules/mailings/fraise.modules.php
+++ b/htdocs/core/modules/mailings/fraise.modules.php
@@ -164,7 +164,7 @@ class mailing_fraise extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname
$sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, ";
- $sql.= " a.nom as name, a.prenom as firstname,";
+ $sql.= " a.lastname, a.firstname,";
$sql.= " a.datefin, a.civilite, a.login, a.societe"; // Other fields
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
$sql.= " WHERE a.email IS NOT NULL";
diff --git a/htdocs/core/modules/mailings/framboise.modules.php b/htdocs/core/modules/mailings/framboise.modules.php
index 964dbdf8db6..e787f750c47 100644
--- a/htdocs/core/modules/mailings/framboise.modules.php
+++ b/htdocs/core/modules/mailings/framboise.modules.php
@@ -62,7 +62,7 @@ class mailing_framboise extends MailingTargets
$cibles = array();
// Select the members from category
- $sql = "SELECT a.rowid as id, a.email as email, a.nom as name, null as fk_contact, a.prenom as firstname,";
+ $sql = "SELECT a.rowid as id, a.email as email, a.lastname, null as fk_contact, a.firstname,";
if ($_POST['filter']) $sql.= " c.label";
else $sql.=" null as label";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php
index ea9a54651a9..573d0987b4c 100644
--- a/htdocs/core/modules/mailings/modules_mailings.php
+++ b/htdocs/core/modules/mailings/modules_mailings.php
@@ -157,14 +157,14 @@ class MailingTargets // This can't be abstract as it is used for some method
$sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " (fk_mailing,";
$sql .= " fk_contact,";
- $sql .= " nom, prenom, email, other, source_url, source_id,";
+ $sql .= " lastname, firstname, email, other, source_url, source_id,";
if (! empty($conf->global->MAILING_EMAIL_UNSUBSCRIBE)) {
$sql .= " tag,";
}
$sql.= " source_type)";
$sql .= " VALUES (".$mailing_id.",";
$sql .= (empty($targetarray['fk_contact']) ? '0' : "'".$targetarray['fk_contact']."'") .",";
- $sql .= "'".$this->db->escape($targetarray['name'])."',";
+ $sql .= "'".$this->db->escape($targetarray['lastname'])."',";
$sql .= "'".$this->db->escape($targetarray['firstname'])."',";
$sql .= "'".$this->db->escape($targetarray['email'])."',";
$sql .= "'".$this->db->escape($targetarray['other'])."',";
diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php
index 64992b251a1..4541b2c92dc 100644
--- a/htdocs/core/modules/mailings/pomme.modules.php
+++ b/htdocs/core/modules/mailings/pomme.modules.php
@@ -146,7 +146,7 @@ class mailing_pomme extends MailingTargets
// La requete doit retourner: id, email, fk_contact, name, firstname
$sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,";
- $sql.= " u.name as name, u.firstname as firstname, u.login, u.office_phone";
+ $sql.= " u.lastname as name, u.firstname as firstname, u.login, u.office_phone";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
$sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test
$sql.= " AND u.entity IN (0,".$conf->entity.")";
diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php
index d6122188d4a..17cb7422f4a 100644
--- a/htdocs/core/modules/modAdherent.class.php
+++ b/htdocs/core/modules/modAdherent.class.php
@@ -75,7 +75,7 @@ class modAdherent extends DolibarrModules
$this->const[5] = array("ADHERENT_MAIL_VALID_SUBJECT","chaine","Votre adhésion a été validée","Sujet du mail de validation");
$this->const[6] = array("ADHERENT_MAIL_RESIL_SUBJECT","chaine","Résiliation de votre adhésion","Sujet du mail de résiliation");
$this->const[21] = array("ADHERENT_MAIL_FROM","chaine","","From des mails");
- $this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %PRENOM%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation");
+ $this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %FIRSTNAME%,\r\nCet email confirme que votre cotisation a été reçue\r\net enregistrée","Mail de validation de cotisation");
$this->const[23] = array("ADHERENT_MAIL_COTIS_SUBJECT","chaine","Reçu de votre cotisation","Sujet du mail de validation de cotisation");
$this->const[25] = array("ADHERENT_CARD_HEADER_TEXT","chaine","%ANNEE%","Texte imprimé sur le haut de la carte adhérent");
$this->const[26] = array("ADHERENT_CARD_FOOTER_TEXT","chaine","Association AZERTY","Texte imprimé sur le bas de la carte adhérent");
@@ -172,9 +172,9 @@ class modAdherent extends DolibarrModules
$this->export_code[$r]=$this->rights_class.'_'.$r;
$this->export_label[$r]='MembersAndSubscriptions';
$this->export_permission[$r]=array(array("adherent","export"));
- $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.nom'=>"Lastname",'a.prenom'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
- $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.nom'=>"Text",'a.prenom'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
- $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.nom'=>"member",'a.prenom'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
+ $this->export_fields_array[$r]=array('a.rowid'=>'Id','a.civilite'=>"UserTitle",'a.lastname'=>"Lastname",'a.firstname'=>"Firstname",'a.login'=>"Login",'a.morphy'=>'Nature','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datevalid'=>'DateValidation','a.tms'=>'DateLastModification','a.datefin'=>'DateEndSubscription','ta.rowid'=>'MemberTypeId','ta.libelle'=>'MemberTypeLabel','c.rowid'=>'SubscriptionId','c.dateadh'=>'DateSubscription','c.cotisation'=>'Amount');
+ $this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.cp'=>"Text",'a.town'=>"Text",'a.pays'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.naiss'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
+ $this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.cp'=>"member",'a.town'=>"member",'a.pays'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.naiss'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
// Add extra fields
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$resql=$this->db->query($sql);
@@ -207,7 +207,7 @@ class modAdherent extends DolibarrModules
$this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('a'=>MAIN_DB_PREFIX.'adherent','extra'=>MAIN_DB_PREFIX.'adherent_extrafields');
$this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id
- $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.prenom'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
+ $this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.nom'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.cp'=>"Zip",'a.town'=>"Town",'a.pays'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.naiss'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member'";
$resql=$this->db->query($sql);
@@ -223,7 +223,7 @@ class modAdherent extends DolibarrModules
// End add extra fields
$this->import_fieldshidden_array[$r]=array('extra.fk_object'=>'lastrowid-'.MAIN_DB_PREFIX.'adherent'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
$this->import_regex_array[$r]=array('a.civilite'=>'code@'.MAIN_DB_PREFIX.'c_civilite','a.fk_adherent_type'=>'rowid@'.MAIN_DB_PREFIX.'adherent_type','a.morphy'=>'(phy|mor)','a.statut'=>'^[0|1]','a.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','a.datefin'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
- $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.prenom'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
+ $this->import_examplevalues_array[$r]=array('a.civilite'=>"MR",'a.nom'=>'Smith','a.firstname'=>'John','a.login'=>'jsmith','a.pass'=>'passofjsmith','a.fk_adherent_type'=>'1','a.morphy'=>'"mor" or "phy"','a.societe'=>'JS company','a.address'=>'21 jump street','a.cp'=>'55000','a.town'=>'New York','a.pays'=>'1','a.email'=>'jsmith@example.com','a.naiss'=>'1972-10-10','a.statut'=>"0 or 1",'a.note'=>"This is a comment on member",'a.datec'=>dol_print_date($now,'%Y-%m-%d'),'a.datefin'=>dol_print_date(dol_time_plus_duree($now, 1, 'y'),'%Y-%m-%d'));
}
diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php
index 976a5d97a5d..a9c8b032af8 100644
--- a/htdocs/core/modules/modCategorie.class.php
+++ b/htdocs/core/modules/modCategorie.class.php
@@ -155,9 +155,9 @@ class modCategorie extends DolibarrModules
$this->export_icon[$r]='category';
$this->export_enabled[$r]='$conf->adherent->enabled';
$this->export_permission[$r]=array(array("categorie","lire"),array("adherent","lire"));
- $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.nom'=>'LastName','p.prenom'=>'Firstname');
- $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:adherent:nom','p.nom'=>'Text','p.prenom'=>'Text');
- $this->export_entities_array[$r]=array('p.rowid'=>'member','p.nom'=>'member','p.prenom'=>'member'); // We define here only fields that use another picto
+ $this->export_fields_array[$r]=array('u.rowid'=>"CategId",'u.label'=>"Label",'u.description'=>"Description",'p.rowid'=>'MemberId','p.lastname'=>'LastName','p.firstname'=>'Firstname');
+ $this->export_TypeFields_array[$r]=array('u.label'=>"Text",'u.description'=>"Text",'p.rowid'=>'List:adherent:nom','p.lastname'=>'Text','p.firstname'=>'Text');
+ $this->export_entities_array[$r]=array('p.rowid'=>'member','p.lastname'=>'member','p.firstname'=>'member'); // We define here only fields that use another picto
$this->export_sql_start[$r]='SELECT DISTINCT ';
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'categorie as u, '.MAIN_DB_PREFIX.'categorie_member as cp, '.MAIN_DB_PREFIX.'adherent as p';
$this->export_sql_end[$r] .=' WHERE u.rowid = cp.fk_categorie AND cp.fk_member = p.rowid';
diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php
index 079ecd01e03..e5b609e36d1 100644
--- a/htdocs/holiday/define_holiday.php
+++ b/htdocs/holiday/define_holiday.php
@@ -159,8 +159,8 @@ foreach($listUsers as $users)
print '
';
diff --git a/htdocs/user/index.php b/htdocs/user/index.php
index 0a052135792..1c1de4c0ccc 100644
--- a/htdocs/user/index.php
+++ b/htdocs/user/index.php
@@ -84,9 +84,9 @@ else
if (! empty($socid)) $sql.= " AND u.fk_societe = ".$socid;
if (! empty($search_user))
{
- $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.name LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')";
+ $sql.= " AND (u.login LIKE '%".$db->escape($search_user)."%' OR u.lastname LIKE '%".$db->escape($search_user)."%' OR u.firstname LIKE '%".$db->escape($search_user)."%')";
}
-if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.name LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')";
+if ($sall) $sql.= " AND (u.login LIKE '%".$db->escape($sall)."%' OR u.lastname LIKE '%".$db->escape($sall)."%' OR u.firstname LIKE '%".$db->escape($sall)."%' OR u.email LIKE '%".$db->escape($sall)."%' OR u.note LIKE '%".$db->escape($sall)."%')";
$sql.=$db->order($sortfield,$sortorder);
$result = $db->query($sql);
@@ -99,7 +99,7 @@ if ($result)
print '