From 7c2a4500d635af9cf45dfa4f0049883b69e2b705 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 12:30:01 +0100 Subject: [PATCH 01/11] fix: change name with lastname --- htdocs/comm/action/class/actioncomm.class.php | 2 +- htdocs/compta/stats/cabyuser.php | 4 ++-- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/modules/mailings/pomme.modules.php | 2 +- htdocs/societe/commerciaux.php | 4 ++-- htdocs/user/index.php | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 43278dbaaa2..95da4f0e34b 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -287,7 +287,7 @@ class ActionComm extends CommonObject $sql.= " a.priority, a.fulldayevent, a.location,"; $sql.= " c.id as type_id, c.code as type_code, c.libelle,"; $sql.= " s.nom as socname,"; - $sql.= " u.firstname, u.name as lastname"; + $sql.= " u.firstname, u.lastname as lastname"; $sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index dc33cd1aa14..3e0afb9966f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -135,7 +135,7 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl $catotal=0; if ($modecompta == 'CREANCES-DETTES') { - $sql = "SELECT u.rowid as rowid, u.name as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; + $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(f.total) as amount, sum(f.total_ttc) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid"; $sql.= " WHERE f.fk_statut in (1,2)"; @@ -149,7 +149,7 @@ else * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les * vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin) */ - $sql = "SELECT u.rowid as rowid, u.name as name, u.firstname as firstname, sum(pf.amount) as amount_ttc"; + $sql = "SELECT u.rowid as rowid, u.lastname as name, u.firstname as firstname, sum(pf.amount) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u" ; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.fk_user_author = u.rowid "; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON pf.fk_facture = f.rowid"; 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/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/societe/commerciaux.php b/htdocs/societe/commerciaux.php index a5c8ec4a8b4..3636a1cb35a 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -146,7 +146,7 @@ if ($_GET["socid"]) $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE sc.fk_soc =".$soc->id; $sql .= " AND sc.fk_user = u.rowid"; - $sql .= " ORDER BY u.name ASC "; + $sql .= " ORDER BY u.lastname ASC "; $resql = $db->query($sql); if ($resql) @@ -199,7 +199,7 @@ if ($_GET["socid"]) $sql = "SELECT u.rowid, u.name, u.firstname, u.login"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE u.entity IN (0,".$conf->entity.")"; - $sql.= " ORDER BY u.name ASC "; + $sql.= " ORDER BY u.lastname ASC "; $resql = $db->query($sql); if ($resql) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 0a052135792..1a3a00b7d18 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); From 9fc18d23e7b00cdb347ccf11386b2a9127a84495 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 13:59:17 +0100 Subject: [PATCH 02/11] fix: change name with lastname --- htdocs/user/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 1a3a00b7d18..1c1de4c0ccc 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -99,7 +99,7 @@ if ($result) print ''; print ''; print_liste_field_titre($langs->trans("Login"),"index.php","u.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("LastName"),"index.php","u.name",$param,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("LastName"),"index.php","u.lastname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("FirstName"),"index.php","u.firstname",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),"index.php","u.fk_societe",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),"index.php","u.datec",$param,"",'align="center"',$sortfield,$sortorder); @@ -123,7 +123,7 @@ if ($result) print img_picto($langs->trans("Administrator"),'star'); } print ''; - print ''; + print ''; print ''; print "'; print ''; - // Prenom + // Firstname print ''; 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 ''; + print ''; print ''; // Password @@ -1078,7 +1076,7 @@ else print ''; // Firstname - print ''; + print ''; 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 ''; -// Nom +// Lastname print ''; print ''; -// Prenom +// Firstname print ''; 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 ''; print ''; - // Nom - print ''; + // Lastname + print ''; print ''; - // Prenom - print ''; + // Firstname + print ''; print ''; // Status diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 20bf2f81eff..f174f5f4a60 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -338,8 +338,8 @@ if ($object->type == 3) print '\n"; - print '\n"; - print '\n"; + print '\n"; + print '\n"; print "\n"; } } diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 98f12489fea..e55f88de7aa 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -39,7 +39,7 @@ $offset = $limit * $page ; $type=GETPOST('type', 'alpha'); $search_lastname=GETPOST('search_nom')?GETPOST('search_nom'):GETPOST('search_lastname'); // For backward compatibility -$search_firstname=GETPOST('search_prenom')?GETPOST('search_prenom'):GETPOST('search_firstname'); // For backward compatibility +$search_firstname=GETPOST('search_firstname')?GETPOST('search_firstname'):GETPOST('search_firstname'); // For backward compatibility $search_company=GETPOST('search_societe')?GETPOST('search_societe'):GETPOST('search_company'); // For backward compatibility $contactname=GETPOST('contactname'); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 277fc83fd48..95bb905348f 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -51,8 +51,8 @@ if (! $sortfield) $sortfield="email"; $id=GETPOST('id','int'); $rowid=GETPOST('rowid','int'); $action=GETPOST("action"); -$search_nom=GETPOST("search_nom"); -$search_prenom=GETPOST("search_prenom"); +$search_lastname=GETPOST("search_lastname"); +$search_firstname=GETPOST("search_firstname"); $search_email=GETPOST("search_email"); // Search modules dirs @@ -154,8 +154,8 @@ if ($action == 'delete') if ($_POST["button_removefilter"]) { - $search_nom=''; - $search_prenom=''; + $search_lastname=''; + $search_firstname=''; $search_email=''; } @@ -369,11 +369,11 @@ if ($object->fetch($id) >= 0) print ''; print ''; - $sql = "SELECT mc.rowid, mc.nom, mc.prenom, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type"; + $sql = "SELECT mc.rowid, mc.lastname, mc.firstname, mc.email, mc.other, mc.statut, mc.date_envoi, mc.source_url, mc.source_id, mc.source_type"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc"; $sql .= " WHERE mc.fk_mailing=".$object->id; - if ($search_nom) $sql.= " AND mc.nom LIKE '%".$db->escape($search_nom)."%'"; - if ($search_prenom) $sql.= " AND mc.prenom LIKE '%".$db->escape($search_prenom)."%'"; + if ($search_lastname) $sql.= " AND mc.lastname LIKE '%".$db->escape($search_lastname)."%'"; + if ($search_firstname) $sql.= " AND mc.firstname LIKE '%".$db->escape($search_firstname)."%'"; if ($search_email) $sql.= " AND mc.email LIKE '%".$db->escape($search_email)."%'"; $sql .= $db->order($sortfield,$sortorder); $sql .= $db->plimit($conf->liste_limit+1, $offset); @@ -384,8 +384,8 @@ if ($object->fetch($id) >= 0) $num = $db->num_rows($resql); $parm = "&id=".$object->id; - if ($search_nom) $parm.= "&search_nom=".urlencode($search_nom); - if ($search_prenom) $parm.= "&search_prenom=".urlencode($search_prenom); + if ($search_lastname) $parm.= "&search_lastname=".urlencode($search_lastname); + if ($search_firstname) $parm.= "&search_firstname=".urlencode($search_firstname); if ($search_email) $parm.= "&search_email=".urlencode($search_email); print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$parm,$sortfield,$sortorder,"",$num,$object->nbemail,''); @@ -394,8 +394,8 @@ if ($object->fetch($id) >= 0) print '
'.ucfirst($obj->name).''.ucfirst($obj->lastname).''.ucfirst($obj->firstname).'"; if ($obj->fk_societe) From 5d8dea788c021f0f89b6277e031f2db8ab0b301d Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 14:17:52 +0100 Subject: [PATCH 03/11] fix: change name with lastname --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ac16c30e220..e42a64d80ff 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -139,7 +139,7 @@ class User extends CommonObject $login=trim($login); // Get user - $sql = "SELECT u.rowid, u.name, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; + $sql = "SELECT u.rowid, u.lastname, u.firstname, u.email, u.job, u.signature, u.office_phone, u.office_fax, u.user_mobile,"; $sql.= " u.admin, u.login, u.webcal_login, u.phenix_login, u.phenix_pass, u.note,"; $sql.= " u.pass, u.pass_crypted, u.pass_temp,"; $sql.= " u.fk_societe, u.fk_socpeople, u.fk_member, u.fk_user, u.ldap_sid,"; From 37cce5d8607eea1fe2149aed8fe0561e624d41d1 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 14:31:59 +0100 Subject: [PATCH 04/11] fix: change name with lastname --- htdocs/adherents/fiche.php | 4 ++-- htdocs/core/boxes/box_members.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 3b1102fe31d..1915f260f69 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -253,7 +253,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->civilite_id = trim($_POST["civilite_id"]); $object->prenom = trim($_POST["prenom"]); // deprecated $object->firstname = trim($_POST["prenom"]); - $object->lastname = trim($_POST["nom"]); + $object->lastname = trim($_POST["lastname"]); $object->login = trim($_POST["login"]); $object->pass = trim($_POST["pass"]); @@ -434,7 +434,7 @@ if ($action == 'add' && $user->rights->adherent->creer) $object->civilite_id = $civilite_id; $object->prenom = $prenom; // deprecated $object->firstname = $prenom; - $object->lastname = $nom; + $object->lastname = $lastname; $object->societe = $societe; $object->address = $address; $object->cp = $zip; // deprecated diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index 1692abffe0a..c24a87b1e24 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.prenom as 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"; From a237be0d2481aa9d1e7f3a2557812d14c2bc5cec Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:26:39 +0100 Subject: [PATCH 05/11] english language standardization --- .../actions_adherentcard_common.class.php | 4 +-- htdocs/adherents/card_subscriptions.php | 2 +- htdocs/adherents/cartes/carte.php | 6 +--- htdocs/adherents/class/adherent.class.php | 15 +++------- htdocs/adherents/cotisations.php | 2 +- htdocs/adherents/document.php | 2 +- htdocs/adherents/fiche.php | 14 ++++----- htdocs/adherents/index.php | 4 +-- htdocs/adherents/ldap.php | 4 +-- htdocs/adherents/liste.php | 10 +++---- htdocs/adherents/type.php | 10 +++---- htdocs/cashdesk/index_verif.php | 4 +-- htdocs/cashdesk/tpl/menu.tpl.php | 2 +- htdocs/categories/categorie.php | 8 ++--- htdocs/categories/viewcat.php | 4 +-- htdocs/comm/contact.php | 2 +- htdocs/comm/mailing/cibles.php | 30 +++++++++---------- htdocs/comm/mailing/fiche.php | 8 ++--- .../install/mysql/migration/3.3.0-3.4.0.sql | 7 +++-- htdocs/user/class/user.class.php | 8 +---- htdocs/user/clicktodial.php | 4 +-- htdocs/user/fiche.php | 26 ++++++++-------- htdocs/user/ldap.php | 4 +-- htdocs/user/note.php | 4 +-- htdocs/user/param_ihm.php | 4 +-- htdocs/user/perms.php | 2 +- 26 files changed, 87 insertions(+), 103 deletions(-) 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.' 
'.$langs->trans("Firstname").''.$member->firstname.' 
'.$langs->trans("Firstname").'
'.$langs->trans("Firstname").'
'.$langs->trans("Firstname").'firstname).'">
'.$langs->trans("Firstname").'firstname).'">
'; print $form->showrefnav($adh,'id'); print '
'.$langs->trans("Lastname").''.$adh->lastname.' 
'.$langs->trans("Firstname").''.$adh->firstname.' 
'.$langs->trans("UserTitle").''.$member->getCivilityLabel().' 
'.$langs->trans("Lastname").''.$member->nom.' 
'.$langs->trans("Lastname").''.$member->lastname.' 
'.$langs->trans("Firstname").''.$member->prenom.' 
'.$langs->trans("Firstname").''.$member->firstname.' 
'; print $member->getNomUrl(1); print "'.$member->nom."'.$member->prenom."'.$member->lastname."'.$member->firstname."
'; print ''; print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"mc.email",$parm,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"mc.nom",$parm,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.prenom",$parm,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"mc.lastname",$parm,"","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.firstname",$parm,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("OtherInformations"),$_SERVER["PHP_SELF"],"",$parm,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"],"",$parm,"",'align="center"',$sortfield,$sortorder); @@ -422,11 +422,11 @@ if ($object->fetch($id) >= 0) print ''; // Name print ''; // Firstname print ''; // Other print '"; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; print "\n"; - // Prenom + // Firstname print ''; - print ''; + print ''; print "\n"; print "
'; - print ''; + print ''; print ''; - print ''; + print ''; print ''; @@ -452,8 +452,8 @@ if ($object->fetch($id) >= 0) print "
'.$obj->email.''.$obj->nom.''.$obj->prenom.''.$obj->lastname.''.$obj->firstname.''.$obj->other.''; 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__' => '', '__UNSUBSCRIBE__' => ''.$langs->trans("MailUnsubcribe").'', '__MAILTOEMAIL__' => ''.$obj->email.'', - '__LASTNAME__' => $obj->nom, - '__FIRSTNAME__' => $obj->prenom, + '__LASTNAME__' => $obj->lastname, + '__FIRSTNAME__' => $obj->firstname, '__OTHER1__' => $other1, '__OTHER2__' => $other2, '__OTHER3__' => $other3, diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 31715239739..63142254bf3 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -48,9 +48,12 @@ alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; alter table llx_adherent CHANGE COLUMN adresse address text; -alter table llx_adherent CHANGE COLUMN nom lastname text; +alter table llx_adherent CHANGE COLUMN nom lastname varchar(50); +alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50); alter table llx_adherent CHANGE COLUMN ville town text; -alter table llx_user CHANGE COLUMN name lastname text; +alter table llx_mailing_cibles CHANGE COLUMN nom lastname varchar(50); +alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50); +alter table llx_user CHANGE COLUMN name lastname varchar(50); alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e42a64d80ff..6d7b4fcfb0e 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -46,7 +46,6 @@ class User extends CommonObject var $ref_ext; var $ldap_sid; var $search_sid; - var $prenom; // TODO deprecated var $lastname; var $firstname; var $note; @@ -190,7 +189,6 @@ class User extends CommonObject $this->ldap_sid = $obj->ldap_sid; $this->lastname = $obj->name; - $this->prenom = $obj->firstname; // TODO deprecated $this->firstname = $obj->firstname; $this->login = $obj->login; @@ -908,7 +906,6 @@ class User extends CommonObject // Positionne parametres $this->admin = 0; - $this->prenom = $contact->prenom; // TODO deprecated $this->lastname = $contact->lastname; $this->firstname = $contact->firstname; $this->email = $contact->email; @@ -1087,7 +1084,6 @@ class User extends CommonObject dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); // Clean parameters - $this->prenom = trim($this->prenom); // deprecated $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); $this->login = trim($this->login); @@ -1184,7 +1180,6 @@ class User extends CommonObject if ($result >= 0) { - $adh->prenom=$this->firstname; // deprecated $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; $adh->login=$this->login; @@ -1723,7 +1718,7 @@ class User extends CommonObject /** * Return a link to the user card (with optionnaly the picto) - * Use this->id,this->lastname, this->prenom + * Use this->id,this->lastname, this->firstname * * @param int $withpicto Include picto in link (0=No picto, 1=Inclut le picto dans le lien, 2=Picto seul) * @param string $option On what the link point to @@ -1941,7 +1936,6 @@ class User extends CommonObject $this->ref = 'SPECIMEN'; $this->specimen=1; - $this->prenom='SPECIMEN'; // deprecated $this->lastname='DOLIBARR'; $this->firstname='SPECIMEN'; $this->note='This is a note'; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 135f1ccb71b..bd39655b730 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -102,9 +102,9 @@ if ($id > 0) print ''.$fuser->lastname.'
'.$langs->trans("Firstname").''.$fuser->name.''.$fuser->firstname.'
\n"; diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 38751435534..79e77debffa 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -175,7 +175,7 @@ if ($action == 'add' && $canadduser) if (! $message) { $object->lastname = $_POST["lastname"]; - $object->firstname = $_POST["prenom"]; + $object->firstname = $_POST["firstname"]; $object->login = $_POST["login"]; $object->admin = $_POST["admin"]; $object->office_phone = $_POST["office_phone"]; @@ -316,7 +316,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->oldcopy=dol_clone($object); $object->lastname = GETPOST("lastname"); - $object->firstname = GETPOST("prenom"); + $object->firstname = GETPOST("firstname"); $object->login = GETPOST("login"); $object->pass = GETPOST("password"); $object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin @@ -546,8 +546,8 @@ if ($action == 'adduserldap') { foreach ($ldapusers as $key => $attribute) { - $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; - $ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; + $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; + $ldap_firstname = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; $ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD]; @@ -708,17 +708,17 @@ if (($action == 'create') || ($action == 'adduserldap')) } print ''; - // Prenom + // Firstname print ''.$langs->trans("Firstname").''; print ''; - if (! empty($ldap_prenom)) + if (! empty($ldap_firstname)) { - print ''; - print $ldap_prenom; + print ''; + print $ldap_firstname; } else { - print ''; + print ''; } print ''; @@ -1087,7 +1087,7 @@ else // Firstname print ''.$langs->trans("Firstname").''; - print ''.$object->prenom.''; + print ''.$object->Firstname.''; print ''."\n"; // Position/Job @@ -1587,12 +1587,12 @@ else print ''; if ($caneditfield && !$object->ldap_sid) { - print ''; + print ''; } else { - print ''; - print $object->prenom; + print ''; + print $object->Firstname; } print ''; diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 837684334b2..50820569979 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -105,9 +105,9 @@ print ''.$langs->trans("Lastname").''; print ''.$fuser->lastname.''; print "\n"; -// Prenom +// Firstname print ''.$langs->trans("Firstname").''; -print ''.$fuser->prenom.''; +print ''.$fuser->firstname.''; print "\n"; // Login diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 13a45f61cb2..421d30cbc7a 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -105,8 +105,8 @@ if ($id) print ''.$langs->trans("Lastname").''.$fuser->lastname.' '; print ''; - // Prenom - print ''.$langs->trans("Firstname").''.$fuser->prenom.' '; + // Firstname + print ''.$langs->trans("Firstname").''.$fuser->firstname.' '; // Login print ''.$langs->trans("Login").''.$fuser->login.' '; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index f389fdaf713..ef620dbd023 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -135,9 +135,9 @@ print ''.$langs->trans("LastName").''; print ''.$fuser->lastname.''; print "\n"; -// Prenom +// FirstName print ''.$langs->trans("FirstName").''; -print ''.$fuser->prenom.''; +print ''.$fuser->firstname.''; print "\n"; print '
'; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index dc6421d886b..1513776e35d 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -261,7 +261,7 @@ print ''."\n"; // Firstname print ''.$langs->trans("Firstname").''; -print ''.$fuser->prenom.''; +print ''.$fuser->firstname.''; print ''."\n"; print '
'; From b699b79a15d117e13bae7020ef5fd8533d86ed16 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:36:12 +0100 Subject: [PATCH 06/11] english language standardization --- htdocs/compta/dons/class/don.class.php | 28 +++++++++---------- .../install/mysql/migration/3.3.0-3.4.0.sql | 2 ++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/dons/class/don.class.php b/htdocs/compta/dons/class/don.class.php index f2c3a6f0704..4abf60b7cf5 100644 --- a/htdocs/compta/dons/class/don.class.php +++ b/htdocs/compta/dons/class/don.class.php @@ -39,8 +39,8 @@ class Don extends CommonObject var $ref; var $date; var $amount; - var $prenom; - var $nom; + var $firstname; + var $lastname; var $societe; var $address; var $cp; @@ -181,8 +181,8 @@ class Don extends CommonObject $this->id=0; $this->ref = 'SPECIMEN'; $this->specimen=1; - $this->nom = 'Doe'; - $this->prenom = 'John'; + $this->lastname = 'Doe'; + $this->firstname = 'John'; $this->socid = 1; $this->date = dol_now(); $this->amount = 100; @@ -210,7 +210,7 @@ class Don extends CommonObject if (dol_strlen(trim($this->societe)) == 0) { - if ((dol_strlen(trim($this->nom)) + dol_strlen(trim($this->prenom))) == 0) + if ((dol_strlen(trim($this->lastname)) + dol_strlen(trim($this->firstname))) == 0) { $error_string[$err] = "Vous devez saisir vos nom et prenom ou le nom de votre societe."; $err++; @@ -310,8 +310,8 @@ class Don extends CommonObject $sql.= ", entity"; $sql.= ", amount"; $sql.= ", fk_paiement"; - $sql.= ", prenom"; - $sql.= ", nom"; + $sql.= ", firstname"; + $sql.= ", lastname"; $sql.= ", societe"; $sql.= ", address"; $sql.= ", cp"; @@ -331,8 +331,8 @@ class Don extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".price2num($this->amount); $sql.= ", ".($this->modepaiementid?$this->modepaiementid:"null"); - $sql.= ", '".$this->db->escape($this->prenom)."'"; - $sql.= ", '".$this->db->escape($this->nom)."'"; + $sql.= ", '".$this->db->escape($this->firstname)."'"; + $sql.= ", '".$this->db->escape($this->lastname)."'"; $sql.= ", '".$this->db->escape($this->societe)."'"; $sql.= ", '".$this->db->escape($this->address)."'"; $sql.= ", '".$this->db->escape($this->zip)."'"; @@ -391,8 +391,8 @@ class Don extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."don SET "; $sql .= "amount = " . price2num($this->amount); $sql .= ",fk_paiement = ".($this->modepaiementid?$this->modepaiementid:"null"); - $sql .= ",prenom = '".$this->db->escape($this->prenom)."'"; - $sql .= ",nom='".$this->db->escape($this->nom)."'"; + $sql .= ",firstname = '".$this->db->escape($this->firstname)."'"; + $sql .= ",lastname='".$this->db->escape($this->lastname)."'"; $sql .= ",societe='".$this->db->escape($this->societe)."'"; $sql .= ",address='".$this->db->escape($this->address)."'"; $sql .= ",cp='".$this->db->escape($this->zip)."'"; @@ -463,7 +463,7 @@ class Don extends CommonObject global $conf; $sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,"; - $sql.= " d.prenom, d.nom, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; + $sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.cp, d.town, d.pays, d.public, d.amount, d.fk_paiement, d.note, cp.libelle, d.email, d.phone, d.phone_mobile, d.fk_don_projet,"; $sql.= " p.title as project_label"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_don_projet"; @@ -483,8 +483,8 @@ class Don extends CommonObject $this->datec = $this->db->jdate($obj->datec); $this->datem = $this->db->jdate($obj->datem); $this->date = $this->db->jdate($obj->datedon); - $this->prenom = $obj->prenom; - $this->nom = $obj->nom; + $this->firstname = $obj->firstname; + $this->lastname = $obj->lastname; $this->societe = $obj->societe; $this->statut = $obj->fk_statut; $this->address = $obj->address; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index f1b05b925e5..3f38d9439a9 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -47,6 +47,8 @@ alter table llx_propal CHANGE COLUMN fk_adresse_livraison fk_delivery_address alter table llx_commande CHANGE COLUMN fk_adresse_livraison fk_delivery_address integer; alter table llx_don CHANGE COLUMN adresse address text; alter table llx_don CHANGE COLUMN ville town text; +alter table llx_don CHANGE COLUMN prenom firstname varchar(50); +alter table llx_don CHANGE COLUMN nom lastname varchar(50); alter table llx_adherent CHANGE COLUMN adresse address text; alter table llx_adherent CHANGE COLUMN nom lastname varchar(50); alter table llx_adherent CHANGE COLUMN prenom firstname varchar(50); From 8d7654916fc16f0aa4eefe2ee308ddc6b961409c Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:46:12 +0100 Subject: [PATCH 07/11] english language standardization --- htdocs/compta/dons/fiche.php | 20 +++++++++---------- htdocs/compta/dons/liste.php | 10 +++++----- htdocs/compta/index.php | 6 +++--- .../class/bonprelevement.class.php | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 9f5d08cdf60..3ffa3847ba3 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -85,8 +85,8 @@ if ($action == 'update') { $don->fetch($id); - $don->prenom = $_POST["prenom"]; - $don->nom = $_POST["nom"]; + $don->firstname = $_POST["firstname"]; + $don->lastname = $_POST["lastname"]; $don->societe = $_POST["societe"]; $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); @@ -137,8 +137,8 @@ if ($action == 'add') if (! $error) { - $don->prenom = $_POST["prenom"]; - $don->nom = $_POST["nom"]; + $don->firstname = $_POST["firstname"]; + $don->lastname = $_POST["lastname"]; $don->societe = $_POST["societe"]; $don->address = $_POST["address"]; $don->amount = price2num($_POST["amount"]); @@ -297,8 +297,8 @@ if ($action == 'create') print "\n"; print "".''.$langs->trans("Company").''; - print "".''.$langs->trans("Firstname").''; - print "".''.$langs->trans("Lastname").''; + print "".''.$langs->trans("Firstname").''; + print "".''.$langs->trans("Lastname").''; print "".''.$langs->trans("Address").''; print ''; @@ -387,8 +387,8 @@ if (! empty($id) && $action == 'edit') $langs->load("companies"); print "".''.$langs->trans("Company").''; - print "".''.$langs->trans("Firstname").''; - print "".''.$langs->trans("Lastname").''; + print "".''.$langs->trans("Firstname").''; + print "".''.$langs->trans("Lastname").''; print "".''.$langs->trans("Address").''; print ''; @@ -483,8 +483,8 @@ if (! empty($id) && $action != 'edit') print "\n"; print "".''.$langs->trans("Company").''.$don->societe.''; - print "".''.$langs->trans("Firstname").''.$don->prenom.''; - print "".''.$langs->trans("Lastname").''.$don->nom.''; + print "".''.$langs->trans("Firstname").''.$don->firstname.''; + print "".''.$langs->trans("Lastname").''.$don->lastname.''; print "".''.$langs->trans("Address").''.dol_nl2br($don->address).''; // Zip / Town diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php index bf96d5243f8..38ad764182d 100644 --- a/htdocs/compta/dons/liste.php +++ b/htdocs/compta/dons/liste.php @@ -60,7 +60,7 @@ llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:M $donationstatic=new Don($db); // Genere requete de liste des dons -$sql = "SELECT d.rowid, d.datedon, d.prenom, d.nom, d.societe,"; +$sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,"; $sql.= " d.amount, d.fk_statut as statut, "; $sql.= " p.rowid as pid, p.ref, p.title, p.public"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p"; @@ -79,7 +79,7 @@ if (trim($search_company) != '') } if (trim($search_name) != '') { - $sql.= ' AND d.nom LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.prenom LIKE \'%'.$db->escape(trim($search_name)) . '%\''; + $sql.= ' AND d.lastname LIKE \'%'.$db->escape(trim($search_name)) . '%\' OR d.firstname LIKE \'%'.$db->escape(trim($search_name)) . '%\''; } $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1, $offset); @@ -109,7 +109,7 @@ if ($resql) print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","&page=$page&statut=$statut","","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"d.societe","&page=$page&statut=$statut","","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.nom","&page=$page&statut=$statut","","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Name"),$_SERVER["PHP_SELF"],"d.lastname","&page=$page&statut=$statut","","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.datedon","&page=$page&statut=$statut","",'align="center"',$sortfield,$sortorder); if (! empty($conf->projet->enabled)) { @@ -154,8 +154,8 @@ if ($resql) print ""; $donationstatic->id=$objp->rowid; $donationstatic->ref=$objp->rowid; - $donationstatic->nom=$objp->nom; - $donationstatic->prenom=$objp->prenom; + $donationstatic->lastname=$objp->lastname; + $donationstatic->firstname=$objp->firstname; print "".$donationstatic->getNomUrl(1)."\n"; print "".$objp->societe."\n"; print "".$donationstatic->getFullName($langs)."\n"; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 281c315eec4..e6a5162b61d 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -512,7 +512,7 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) $langs->load("boxes"); $donationstatic=new Don($db); - $sql = "SELECT d.rowid, d.nom, d.prenom, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut"; + $sql = "SELECT d.rowid, d.lastname, d.firstname, d.societe, d.datedon as date, d.tms as dm, d.amount, d.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " WHERE d.entity = ".$conf->entity; $sql.= $db->order("d.tms","DESC"); @@ -544,8 +544,8 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) $var=!$var; print ''; $donationstatic->id=$objp->rowid; - $donationstatic->nom=$objp->nom; - $donationstatic->prenom=$objp->prenom; + $donationstatic->lastname=$objp->lastname; + $donationstatic->firstname=$objp->firstname; $label=$donationstatic->getFullName($langs); if ($objp->societe) $label.=($label?' - ':'').$objp->societe; $donationstatic->ref=$label; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 4182e66c919..0c0c55ebf57 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -540,7 +540,7 @@ class BonPrelevement extends CommonObject $this->method_trans = $method; $langs->load('withdrawals'); $subject = $langs->trans("InfoTransSubject", $this->ref); - $message = $langs->trans("InfoTransMessage", $this->ref, $user->prenom, $user->nom); + $message = $langs->trans("InfoTransMessage", $this->ref, $user->firstname, $user->lastname); $message .=$langs->trans("InfoTransData", price($this->amount), $this->methodes_trans[$this->method_trans], dol_print_date($date,'day')); // TODO Call trigger to create a notification using notification module From 382d216d54bd4d6ce0fef9c19a8f0ac0ce0d4670 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 15:58:26 +0100 Subject: [PATCH 08/11] english language standardization --- .../actions_contactcard_common.class.php | 4 ++-- htdocs/contact/class/contact.class.php | 19 +++++++------------ .../install/mysql/migration/3.3.0-3.4.0.sql | 1 + 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 1bb8a29ad5a..af621b7a53a 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -395,10 +395,10 @@ abstract class ActionsContactCardCommon 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->nom, $this->object->prenom); + $login=dol_buildlogin($this->object->lastname, $this->object->firstname); $generated_password=getRandomPassword(''); $password=$generated_password; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 17e646b5a8d..9c5ff1a2a6f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -42,7 +42,6 @@ class Contact extends CommonObject var $name; // TODO deprecated var $nom; // TODO deprecated var $firstname; - var $prenom; // TODO deprecated var $address; var $cp; // TODO deprecated var $zip; @@ -110,7 +109,7 @@ class Contact extends CommonObject $this->db->begin(); // Clean parameters - $this->lastname=$this->lastname?trim($this->lastname):$this->name; + $this->lastname=$this->lastname?trim($this->lastname):$this->lastname; $this->firstname=trim($this->firstname); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords($this->lastname); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname); @@ -120,7 +119,7 @@ class Contact extends CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople ("; $sql.= " datec"; $sql.= ", fk_soc"; - $sql.= ", name"; + $sql.= ", lastname"; $sql.= ", firstname"; $sql.= ", fk_user_creat"; $sql.= ", priv"; @@ -216,7 +215,7 @@ class Contact extends CommonObject $this->id = $id; // Clean parameters - $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->name); + $this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); $this->firstname=trim($this->firstname); $this->email=trim($this->email); $this->phone_pro=trim($this->phone_pro); @@ -234,7 +233,7 @@ class Contact extends CommonObject if ($this->socid > 0) $sql .= " fk_soc='".$this->db->escape($this->socid)."',"; else if ($this->socid == -1) $sql .= " fk_soc=null,"; $sql .= " civilite='".$this->db->escape($this->civilite_id)."'"; - $sql .= ", name='".$this->db->escape($this->lastname)."'"; + $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'"; $sql .= ", cp='".$this->db->escape($this->zip)."'"; @@ -482,7 +481,7 @@ class Contact extends CommonObject $langs->load("companies"); - $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.name as lastname, c.firstname,"; + $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.lastname, c.firstname,"; $sql.= " c.address, c.cp as zip, c.town as town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; @@ -513,11 +512,7 @@ class Contact extends CommonObject $this->ref = $obj->rowid; $this->civilite_id = $obj->civilite_id; $this->lastname = $obj->lastname; - $this->name = $obj->lastname; // TODO deprecated $this->firstname = $obj->firstname; - $this->nom = $obj->lastname; // TODO deprecated - $this->prenom = $obj->firstname; // TODO deprecated - $this->address = $obj->address; $this->cp = $obj->zip; // TODO deprecated $this->zip = $obj->zip; @@ -683,7 +678,7 @@ class Contact extends CommonObject $error=0; - $this->old_name = $obj->name; + $this->old_lastname = $obj->lastname; $this->old_firstname = $obj->firstname; $this->db->begin(); @@ -853,7 +848,7 @@ class Contact extends CommonObject /** * Return name of contact with link (and eventually picto) - * Use $this->id, $this->name, $this->firstname, this->civilite_id + * Use $this->id, $this->lastname, $this->firstname, this->civilite_id * * @param int $withpicto Include picto with link * @param string $option Where the link point to diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 3f38d9439a9..8eadd64e931 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -58,6 +58,7 @@ alter table llx_mailing_cibles CHANGE COLUMN prenom firstname varchar(50); alter table llx_user CHANGE COLUMN name lastname varchar(50); alter table llx_entrepot CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text; +alter table llx_socpeople CHANGE COLUMN name lastname varchar(50); alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_bank_account CHANGE COLUMN adresse_proprio owner_address text; From 048035a05b443cb6a6ad009e6f02173ec1173a21 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 16:08:35 +0100 Subject: [PATCH 09/11] english language standardization --- htdocs/contact/fiche.php | 6 +++--- htdocs/contact/list.php | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 4151a2f078b..b48236acf03 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -633,7 +633,7 @@ else print $object->ref; print ''; - // Name + // Lastname print ''.$langs->trans("Lastname").' / '.$langs->trans("Label").'lastname).'">'; print ''.$langs->trans("Firstname").'firstname).'">'; @@ -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 ''; From ac0e99bc1a7af555d9f91be046bb4752ce031370 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 16:21:49 +0100 Subject: [PATCH 10/11] english language standardization --- htdocs/core/boxes/box_members.php | 2 +- htdocs/core/class/CMailFile.class.php | 4 ++-- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/lib/company.lib.php | 4 ++-- htdocs/core/modules/mailings/fraise.modules.php | 2 +- htdocs/core/modules/mailings/framboise.modules.php | 2 +- htdocs/core/modules/mailings/modules_mailings.php | 4 ++-- htdocs/core/modules/modAdherent.class.php | 12 ++++++------ htdocs/core/modules/modCategorie.class.php | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php index c24a87b1e24..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.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/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/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'; From 4f9f32eb3e650bb8a098169caec11bf7bbe2d73f Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 16:37:17 +0100 Subject: [PATCH 11/11] english language standardization --- htdocs/holiday/define_holiday.php | 4 ++-- htdocs/holiday/fiche.php | 16 ++++++++-------- htdocs/holiday/index.php | 4 ++-- htdocs/holiday/month_report.php | 2 +- htdocs/projet/tasks/time.php | 4 ++-- htdocs/public/donations/donateurs_code.php | 4 ++-- htdocs/public/members/new.php | 10 +++++----- htdocs/public/members/public_list.php | 10 +++++----- htdocs/societe/soc.php | 6 +++--- 9 files changed, 30 insertions(+), 30 deletions(-) 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 ''.$users['rowid'].''; print ''; $userstatic->id=$users['rowid']; - $userstatic->nom=$users['name']; - $userstatic->prenom=$users['firstname']; + $userstatic->lastname=$users['lastname']; + $userstatic->firstname=$users['firstname']; print $userstatic->getNomUrl(1); print ''; print ''; diff --git a/htdocs/holiday/fiche.php b/htdocs/holiday/fiche.php index 4e2375acca3..8602163b583 100644 --- a/htdocs/holiday/fiche.php +++ b/htdocs/holiday/fiche.php @@ -288,7 +288,7 @@ if ($action == 'confirm_send') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Veuillez trouver ci-dessous une demande de congés payés à valider.\n"; @@ -319,7 +319,7 @@ if ($action == 'confirm_send') } $message.= "\n"; - $message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("Name")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; @@ -397,10 +397,10 @@ if($action == 'confirm_valid') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysValidated"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Votre demande de congés payés du ".dol_print_date($cp->date_debut,'day')." au ".dol_print_date($cp->date_fin,'day')." vient d'être validée!\n"; - $message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; @@ -465,11 +465,11 @@ if ($action == 'confirm_refuse') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysRefused"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Votre demande de congés payés ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')." vient d'être refusée pour le motif suivant :\n"; $message.= $_POST['detail_refuse']."\n\n"; - $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; @@ -536,10 +536,10 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes') $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysCanceled"); // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->prenom.",\n"; + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message.= "\n"; $message.= "Votre demande de congés ".dol_print_date($cp->date_debut,'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($cp->date_fin,'day')." va été annulée.\n"; - $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->prenom." ".$expediteur->nom."\n"; + $message.= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".$expediteur->firstname." ".$expediteur->lastname."\n"; $message.= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/fiche.php?id=".$cp->rowid."\n\n"; $message.= "\n"; diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index 16d2edddf7e..d084c0ce2ef 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -211,12 +211,12 @@ if ($id > 0) print ''; print ''; - // Nom + // LastName print ''.$langs->trans("LastName").''; print ''.$fuser->lastname.''; print "\n"; - // Prenom + // FirstName print ''.$langs->trans("FirstName").''; print ''.$fuser->firstname.''; print "\n"; diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 940a870c781..de0ae3a9960 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -126,7 +126,7 @@ if($num == '0') { print ''; print ''.$holidaystatic->getNomUrl(1).''; - print ''.$user->nom.' '.$user->prenom.''; + print ''.$user->lastname.' '.$user->firstname.''; print ''.dol_print_date($start_date,'day'); print ''; print ''.dol_print_date($end_date,'day'); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 19988738e8e..682c46f75a9 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -412,8 +412,8 @@ if ($id > 0 || ! empty($ref)) else { $userstatic->id = $task_time->fk_user; - $userstatic->nom = $task_time->name; - $userstatic->prenom = $task_time->firstname; + $userstatic->lastname = $task_time->lastname; + $userstatic->firstname = $task_time->firstname; print $userstatic->getNomUrl(1); } print ''; diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index 508b0c55fcf..f354cffe8a1 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -54,7 +54,7 @@ $langs->load("donations"); llxHeaderVierge(); -$sql = "SELECT d.datedon as datedon, d.nom, d.prenom, d.amount, d.public, d.societe"; +$sql = "SELECT d.datedon as datedon, d.lastname, d.firstname, d.amount, d.public, d.societe"; $sql.= " FROM ".MAIN_DB_PREFIX."don as d"; $sql.= " WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC"; @@ -84,7 +84,7 @@ if ($resql) print ""; if ($objp->public) { - print "".$objp->prenom." ".$objp->nom." ".$objp->societe."\n"; + print "".$objp->firstname." ".$objp->lastname." ".$objp->societe."\n"; } else { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5d2ef581a7a..078994e3f9a 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -187,7 +187,7 @@ if ($action == 'add') $error+=1; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Lastname"))."
\n"; } - if (empty($_POST["prenom"])) + if (empty($_POST["firstname"])) { $error+=1; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Firstname"))."
\n"; @@ -223,8 +223,8 @@ if ($action == 'add') $adh = new Adherent($db); $adh->statut = -1; $adh->public = $_POST["public"]; - $adh->prenom = $_POST["prenom"]; - $adh->nom = $_POST["nom"]; + $adh->firstname = $_POST["firstname"]; + $adh->lastname = $_POST["lastname"]; $adh->civilite_id = $_POST["civilite_id"]; $adh->societe = $_POST["societe"]; $adh->address = $_POST["address"]; @@ -448,9 +448,9 @@ else print ''.$langs->trans('UserTitle').''; print $formcompany->select_civility(GETPOST('civilite_id'),'civilite_id').''."\n"; // Lastname -print ''.$langs->trans("Lastname").' *'."\n"; +print ''.$langs->trans("Lastname").' *'."\n"; // Firstname -print ''.$langs->trans("Firstname").' *'."\n"; +print ''.$langs->trans("Firstname").' *'."\n"; // Company print ''.$langs->trans("Company").''."\n"; // Address diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 13fced8eda2..00d09e67112 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -101,14 +101,14 @@ if (! $sortfield) { $sortfield="nom"; } llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers")); -$sql = "SELECT rowid, prenom, nom, societe, cp as zip, town, email, naiss, photo"; +$sql = "SELECT rowid, firstname, lastname, societe, cp as zip, town, email, naiss, photo"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent"; $sql.= " WHERE entity = ".$entity; $sql.= " AND statut = 1"; $sql.= " AND public = 1"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($conf->liste_limit+1, $offset); -//$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; +//$sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, cp, town, d.email, t.libelle as type, d.morphy, d.statut, t.cotisation"; //$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; //$sql .= " WHERE d.fk_adherent_type = t.rowid AND d.statut = $statut"; //$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit, $offset); @@ -124,8 +124,8 @@ if ($result) print ''; print ''; - print ''."\n"; //print_liste_field_titre($langs->trans("DateToBirth"),"public_list.php","naiss",'',$param,$sortfield,$sortorder); // est-ce nécessaire ?? print_liste_field_titre($langs->trans("EMail"),"public_list.php","email",'',$param,$sortfield,$sortorder); @@ -140,7 +140,7 @@ if ($result) $objp = $db->fetch_object($result); $var=!$var; print ""; - print ''."\n"; + print ''."\n"; //print "\n"; // est-ce nécessaire ?? print ''."\n"; print ''."\n"; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 11056d4381a..c196327e5a2 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -112,11 +112,11 @@ if (empty($reshook)) { $object->particulier = GETPOST("private"); - $object->name = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?GETPOST('prenom').' '.GETPOST('nom'):GETPOST('nom').' '.GETPOST('prenom'); + $object->name = empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)?GETPOST('firstname').' '.GETPOST('nom'):GETPOST('nom').' '.GETPOST('firstname'); $object->civilite_id = GETPOST('civilite_id'); // Add non official properties $object->name_bis = GETPOST('nom'); - $object->firstname = GETPOST('prenom'); + $object->firstname = GETPOST('firstname'); } else { @@ -748,7 +748,7 @@ else // If javascript on, we show option individual if ($conf->use_javascript_ajax) { - print ''; + print ''; print ''; print '';
'.$langs->trans("Firstname").''; - print ' '.$langs->trans("Lastname").''; + print ''.$langs->trans("Firstname").''; + print ' '.$langs->trans("Lastname").''; print ' / '.$langs->trans("Company").'
'.$objp->prenom.' '.$objp->nom.($objp->societe?' / '.$objp->societe:'').''.$objp->firstname.' '.$objp->lastname.($objp->societe?' / '.$objp->societe:'').'$objp->naiss'.$objp->email.''.$objp->zip.'
'.$langs->trans('FirstName').'
'.$langs->trans('FirstName').' 
'.$langs->trans("UserTitle").''; print $formcompany->select_civility($object->civility_id).'