english language standardization

This commit is contained in:
Grand Philippe
2013-02-23 15:26:39 +01:00
parent 37cce5d860
commit a237be0d24
26 changed files with 87 additions and 103 deletions

View File

@@ -364,10 +364,10 @@ abstract class ActionsAdherentCardCommon
if ($action == 'create_user') 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'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.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(''); $generated_password=getRandomPassword('');
$password=$generated_password; $password=$generated_password;

View File

@@ -654,7 +654,7 @@ if ($rowid)
*/ */
if ($action != 'addsubscription' && $action != 'create_thirdparty') 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.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,"; $sql.= " c.dateadh,";
$sql.= " c.datef,"; $sql.= " c.datef,";

View File

@@ -61,7 +61,7 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg
$arrayofmembers=array(); $arrayofmembers=array();
// requete en prenant que les adherents a jour de cotisation // 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.= " d.address, d.cp as zip, d.town, d.naiss, d.email, d.photo,";
$sql.= " t.libelle as type,"; $sql.= " t.libelle as type,";
$sql.= " p.code as country_code, p.libelle as country"; $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, '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
'%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated
// For backward compatibility // For backward compatibility
'%PRENOM%'=>$objp->firstname,
'%LASTNAME%'=>$objp->lastname,
'%SOCIETE%'=>$objp->company, '%SOCIETE%'=>$objp->company,
'%ADDRESS%'=>$objp->address,
'%CP%'=>$objp->zip, '%CP%'=>$objp->zip,
'%TOWN%'=>$objp->town,
'%PAYS%'=>$objp->country, '%PAYS%'=>$objp->country,
'%ANNEE%'=>$year, '%ANNEE%'=>$year,
'%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated

View File

@@ -45,7 +45,6 @@ class Adherent extends CommonObject
var $ref; var $ref;
var $civilite_id; var $civilite_id;
var $firstname; var $firstname;
var $prenom; // deprecated
var $lastname; var $lastname;
var $login; var $login;
var $pass; var $pass;
@@ -227,12 +226,8 @@ class Adherent extends CommonObject
'%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass, '%PASSWORD%'=>$msgishtml?dol_htmlentitiesbr($this->pass):$this->pass,
// For backward compatibility // For backward compatibility
'%INFOS%'=>$msgishtml?dol_htmlentitiesbr($infos):$infos, '%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, '%SOCIETE%'=>$msgishtml?dol_htmlentitiesbr($this->societe):$this->societe,
'%ADDRESS%'=>$msgishtml?dol_htmlentitiesbr($this->address):$this->address,
'%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip, '%CP%'=>$msgishtml?dol_htmlentitiesbr($this->zip):$this->zip,
'%TOWN%'=>$msgishtml?dol_htmlentitiesbr($this->town):$this->town,
'%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country, '%PAYS%'=>$msgishtml?dol_htmlentitiesbr($this->country):$this->country,
); );
@@ -400,7 +395,7 @@ class Adherent extends CommonObject
// Clean parameters // Clean parameters
$this->lastname=trim($this->lastname)?trim($this->lastname):trim($this->lastname); $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->address=($this->address?$this->address:$this->address);
$this->zip=($this->zip?$this->zip:$this->cp); $this->zip=($this->zip?$this->zip:$this->cp);
$this->town=($this->town?$this->town:$this->town); $this->town=($this->town?$this->town:$this->town);
@@ -421,7 +416,7 @@ class Adherent extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET"; $sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
$sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null"); $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.= ", lastname=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null"); $sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
$sql.= ", societe=" .($this->societe?"'".$this->db->escape($this->societe)."'":"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->civilite_id=$this->civilite_id;
$luser->firstname=$this->firstname; $luser->firstname=$this->firstname;
$luser->lastname=$this->lastname; $luser->lastname=$this->lastname;
$luser->prenom=$this->firstname; // deprecated
$luser->login=$this->user_login; $luser->login=$this->user_login;
$luser->pass=$this->pass; $luser->pass=$this->pass;
$luser->societe_id=$this->societe; $luser->societe_id=$this->societe;
@@ -1015,7 +1009,7 @@ class Adherent extends CommonObject
{ {
global $langs; 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.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.photo, d.fk_adherent_type, d.morphy, d.entity,";
$sql.= " d.datec as datec,"; $sql.= " d.datec as datec,";
@@ -1053,7 +1047,6 @@ class Adherent extends CommonObject
$this->ref = $obj->rowid; $this->ref = $obj->rowid;
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->civilite_id = $obj->civilite; $this->civilite_id = $obj->civilite;
$this->prenom = $obj->firstname; // deprecated
$this->firstname = $obj->firstname; $this->firstname = $obj->firstname;
$this->lastname = $obj->lastname; $this->lastname = $obj->lastname;
$this->login = $obj->login; $this->login = $obj->login;
@@ -1813,7 +1806,7 @@ class Adherent extends CommonObject
// Member // Member
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname; 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->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->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->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; if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;

View File

@@ -64,7 +64,7 @@ llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Modu
if ($msg) print $msg.'<br>'; if ($msg) print $msg.'<br>';
// Liste des cotisations // 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.rowid as crowid, c.cotisation,";
$sql.= " c.dateadh,"; $sql.= " c.dateadh,";
$sql.= " c.datef,"; $sql.= " c.datef,";

View File

@@ -163,7 +163,7 @@ if ($id > 0)
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.'&nbsp;</td>';
print '</tr>'; print '</tr>';
// Prenom // Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.'&nbsp;</td>';
print '</tr>'; print '</tr>';

View File

@@ -251,8 +251,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
// Change values // Change values
$object->civilite_id = trim($_POST["civilite_id"]); $object->civilite_id = trim($_POST["civilite_id"]);
$object->prenom = trim($_POST["prenom"]); // deprecated $object->firstname = trim($_POST["firstname"]);
$object->firstname = trim($_POST["prenom"]);
$object->lastname = trim($_POST["lastname"]); $object->lastname = trim($_POST["lastname"]);
$object->login = trim($_POST["login"]); $object->login = trim($_POST["login"]);
$object->pass = trim($_POST["pass"]); $object->pass = trim($_POST["pass"]);
@@ -408,7 +407,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$typeid=$_POST["typeid"]; $typeid=$_POST["typeid"];
$civilite_id=$_POST["civilite_id"]; $civilite_id=$_POST["civilite_id"];
$lastname=$_POST["lastname"]; $lastname=$_POST["lastname"];
$prenom=$_POST["prenom"]; $firstname=$_POST["firstname"];
$societe=$_POST["societe"]; $societe=$_POST["societe"];
$address=$_POST["address"]; $address=$_POST["address"];
$zip=$_POST["zipcode"]; $zip=$_POST["zipcode"];
@@ -432,8 +431,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$socid=$_POST["socid"]; $socid=$_POST["socid"];
$object->civilite_id = $civilite_id; $object->civilite_id = $civilite_id;
$object->prenom = $prenom; // deprecated $object->firstname = $firstname;
$object->firstname = $prenom;
$object->lastname = $lastname; $object->lastname = $lastname;
$object->societe = $societe; $object->societe = $societe;
$object->address = $address; $object->address = $address;
@@ -502,7 +500,7 @@ if ($action == 'add' && $user->rights->adherent->creer)
$langs->load("errors"); $langs->load("errors");
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n"; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n";
} }
if ($morphy != 'mor' && (!isset($prenom) || $prenom=='')) { if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
$error++; $error++;
$langs->load("errors"); $langs->load("errors");
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n"; $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n";
@@ -821,7 +819,7 @@ else
print '</tr>'; print '</tr>';
// Firstname // Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(GETPOST('prenom','alpha')?GETPOST('prenom','alpha'):$object->firstname).'"></td>'; print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(GETPOST('firstname','alpha')?GETPOST('firstname','alpha'):$object->firstname).'"></td>';
print '</tr>'; print '</tr>';
// Password // Password
@@ -1078,7 +1076,7 @@ else
print '</tr>'; print '</tr>';
// Firstname // Firstname
print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="prenom" size="40" value="'.(isset($_POST["prenom"])?$_POST["prenom"]:$object->firstname).'"></td>'; print '<tr><td id="tdfirstname">'.$langs->trans("Firstname").'</td><td><input type="text" name="firstname" size="40" value="'.(isset($_POST["firstname"])?$_POST["firstname"]:$object->firstname).'"></td>';
print '</tr>'; print '</tr>';
// Password // Password

View File

@@ -205,7 +205,7 @@ $var=true;
*/ */
$max=5; $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.= " a.tms as datem, datefin as date_end_subscription,";
$sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation"; $sql.= " ta.rowid as typeid, ta.libelle, ta.cotisation";
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
@@ -265,7 +265,7 @@ else
*/ */
$max=5; $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.= " 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.= " 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"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."cotisation as c";

View File

@@ -108,11 +108,11 @@ print '<td class="valeur">';
print $form->showrefnav($adh,'id'); print $form->showrefnav($adh,'id');
print '</td></tr>'; print '</td></tr>';
// Nom // Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$adh->lastname.'&nbsp;</td>';
print '</tr>'; print '</tr>';
// Prenom // Firstname
print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.'&nbsp;</td>'; print '<tr><td width="15%">'.$langs->trans("Firstname").'</td><td class="valeur">'.$adh->firstname.'&nbsp;</td>';
print '</tr>'; print '</tr>';

View File

@@ -40,7 +40,7 @@ $statut=GETPOST("statut");
$search=GETPOST("search"); $search=GETPOST("search");
$search_ref=GETPOST("search_ref"); $search_ref=GETPOST("search_ref");
$search_lastname=GETPOST("search_lastname"); $search_lastname=GETPOST("search_lastname");
$search_prenom=GETPOST("search_prenom"); $search_firstname=GETPOST("search_firstname");
$search_login=GETPOST("search_login"); $search_login=GETPOST("search_login");
$type=GETPOST("type"); $type=GETPOST("type");
$search_email=GETPOST("search_email"); $search_email=GETPOST("search_email");
@@ -63,7 +63,7 @@ if (GETPOST("button_removefilter"))
$search=""; $search="";
$search_ref=""; $search_ref="";
$search_lastname=""; $search_lastname="";
$search_prenom=""; $search_firstname="";
$search_login=""; $search_login="";
$type=""; $type="";
$search_email=""; $search_email="";
@@ -86,7 +86,7 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adh&eacute
$now=dol_now(); $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.datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation"; $sql.= " t.libelle as type, t.cotisation";
@@ -103,7 +103,7 @@ if ($sall)
{ {
$sql.=" AND ("; $sql.=" AND (";
if (is_numeric($sall)) $sql.= "d.rowid = ".$sall." OR "; 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.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
$sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')"; $sql.=" OR d.town LIKE '%".$sall."%' OR d.note LIKE '%".$sall."%')";
} }
@@ -122,7 +122,7 @@ if ($search_ref)
} }
if ($search_lastname) 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) if ($search_login)
{ {

View File

@@ -405,7 +405,7 @@ if ($rowid > 0)
$now=dol_now(); $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.datefin,";
$sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,"; $sql.= " d.email, d.fk_adherent_type as type_id, d.morphy, d.statut,";
$sql.= " t.libelle as type, t.cotisation"; $sql.= " t.libelle as type, t.cotisation";
@@ -415,7 +415,7 @@ if ($rowid > 0)
$sql.= " AND t.rowid = ".$adht->id; $sql.= " AND t.rowid = ".$adht->id;
if ($sall) 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.email LIKE '%".$sall."%' OR d.login LIKE '%".$sall."%' OR d.address LIKE '%".$sall."%'";
$sql.= " OR d.town LIKE '%".$sall."%' OR d.note 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'] != '') 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)) 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)) if (! empty($search_login))
{ {
@@ -493,7 +493,7 @@ if ($rowid > 0)
$param="&rowid=".$rowid; $param="&rowid=".$rowid;
if (! empty($status)) $param.="&status=".$status; if (! empty($status)) $param.="&status=".$status;
if (! empty($search_lastname)) $param.="&search_lastname=".$search_lastname; 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_login)) $param.="&search_login=".$search_login;
if (! empty($search_email)) $param.="&search_email=".$search_email; if (! empty($search_email)) $param.="&search_email=".$search_email;
if (! empty($filter)) $param.="&filter=".$filter; if (! empty($filter)) $param.="&filter=".$filter;

View File

@@ -94,8 +94,8 @@ if ( $retour >= 0 )
$_SESSION['uid'] = $tab['rowid']; $_SESSION['uid'] = $tab['rowid'];
$_SESSION['uname'] = $username; $_SESSION['uname'] = $username;
$_SESSION['nom'] = $tab['name']; $_SESSION['lastname'] = $tab['lastname'];
$_SESSION['prenom'] = $tab['firstname']; $_SESSION['firstname'] = $tab['firstname'];
$_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid; $_SESSION['CASHDESK_ID_THIRDPARTY'] = $thirdpartyid;
$_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid; $_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid;
$_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : ''); $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : '');

View File

@@ -66,7 +66,7 @@ print '<li class="menu_choix1"><a href="affIndex.php?menu=facturation&id=NOUV"><
// Open new tab on backoffice (this is not a disconnect from POS) // Open new tab on backoffice (this is not a disconnect from POS)
print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>'; print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>';
// Disconnect // Disconnect
print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['prenom'].' '.$_SESSION['nom']; print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname'];
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>'; print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';
print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>'; print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>'; /*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';

View File

@@ -407,12 +407,12 @@ else if ($id || $ref)
print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$member->getCivilityLabel().'&nbsp;</td>'; print '<tr><td>'.$langs->trans("UserTitle").'</td><td class="valeur">'.$member->getCivilityLabel().'&nbsp;</td>';
print '</tr>'; print '</tr>';
// Nom // Lastname
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->nom.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur">'.$member->lastname.'&nbsp;</td>';
print '</tr>'; print '</tr>';
// Prenom // Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->prenom.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur">'.$member->firstname.'&nbsp;</td>';
print '</tr>'; print '</tr>';
// Status // Status

View File

@@ -338,8 +338,8 @@ if ($object->type == 3)
print '<td nowrap="nowrap" valign="top">'; print '<td nowrap="nowrap" valign="top">';
print $member->getNomUrl(1); print $member->getNomUrl(1);
print "</td>\n"; print "</td>\n";
print '<td valign="top">'.$member->nom."</td>\n"; print '<td valign="top">'.$member->lastname."</td>\n";
print '<td valign="top">'.$member->prenom."</td>\n"; print '<td valign="top">'.$member->firstname."</td>\n";
print "</tr>\n"; print "</tr>\n";
} }
} }

View File

@@ -39,7 +39,7 @@ $offset = $limit * $page ;
$type=GETPOST('type', 'alpha'); $type=GETPOST('type', 'alpha');
$search_lastname=GETPOST('search_nom')?GETPOST('search_nom'):GETPOST('search_lastname'); // For backward compatibility $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 $search_company=GETPOST('search_societe')?GETPOST('search_societe'):GETPOST('search_company'); // For backward compatibility
$contactname=GETPOST('contactname'); $contactname=GETPOST('contactname');

View File

@@ -51,8 +51,8 @@ if (! $sortfield) $sortfield="email";
$id=GETPOST('id','int'); $id=GETPOST('id','int');
$rowid=GETPOST('rowid','int'); $rowid=GETPOST('rowid','int');
$action=GETPOST("action"); $action=GETPOST("action");
$search_nom=GETPOST("search_nom"); $search_lastname=GETPOST("search_lastname");
$search_prenom=GETPOST("search_prenom"); $search_firstname=GETPOST("search_firstname");
$search_email=GETPOST("search_email"); $search_email=GETPOST("search_email");
// Search modules dirs // Search modules dirs
@@ -154,8 +154,8 @@ if ($action == 'delete')
if ($_POST["button_removefilter"]) if ($_POST["button_removefilter"])
{ {
$search_nom=''; $search_lastname='';
$search_prenom=''; $search_firstname='';
$search_email=''; $search_email='';
} }
@@ -369,11 +369,11 @@ if ($object->fetch($id) >= 0)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="id" value="'.$object->id.'">';
$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 .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql .= " WHERE mc.fk_mailing=".$object->id; $sql .= " WHERE mc.fk_mailing=".$object->id;
if ($search_nom) $sql.= " AND mc.nom LIKE '%".$db->escape($search_nom)."%'"; if ($search_lastname) $sql.= " AND mc.lastname LIKE '%".$db->escape($search_lastname)."%'";
if ($search_prenom) $sql.= " AND mc.prenom LIKE '%".$db->escape($search_prenom)."%'"; if ($search_firstname) $sql.= " AND mc.firstname LIKE '%".$db->escape($search_firstname)."%'";
if ($search_email) $sql.= " AND mc.email LIKE '%".$db->escape($search_email)."%'"; if ($search_email) $sql.= " AND mc.email LIKE '%".$db->escape($search_email)."%'";
$sql .= $db->order($sortfield,$sortorder); $sql .= $db->order($sortfield,$sortorder);
$sql .= $db->plimit($conf->liste_limit+1, $offset); $sql .= $db->plimit($conf->liste_limit+1, $offset);
@@ -384,8 +384,8 @@ if ($object->fetch($id) >= 0)
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
$parm = "&amp;id=".$object->id; $parm = "&amp;id=".$object->id;
if ($search_nom) $parm.= "&amp;search_nom=".urlencode($search_nom); if ($search_lastname) $parm.= "&amp;search_lastname=".urlencode($search_lastname);
if ($search_prenom) $parm.= "&amp;search_prenom=".urlencode($search_prenom); if ($search_firstname) $parm.= "&amp;search_firstname=".urlencode($search_firstname);
if ($search_email) $parm.= "&amp;search_email=".urlencode($search_email); if ($search_email) $parm.= "&amp;search_email=".urlencode($search_email);
print_barre_liste($langs->trans("MailSelectedRecipients"),$page,$_SERVER["PHP_SELF"],$parm,$sortfield,$sortorder,"",$num,$object->nbemail,''); 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 '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"mc.email",$parm,"","",$sortfield,$sortorder); 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("Lastname"),$_SERVER["PHP_SELF"],"mc.lastname",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"mc.prenom",$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("OtherInformations"),$_SERVER["PHP_SELF"],"",$parm,"","",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"],"",$parm,"",'align="center"',$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 '</td>'; print '</td>';
// Name // Name
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_nom" size="12" value="'.$search_nom.'">'; print '<input class="flat" type="text" name="search_lastname" size="12" value="'.$search_lastname.'">';
print '</td>'; print '</td>';
// Firstname // Firstname
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '<input class="flat" type="text" name="search_prenom" size="10" value="'.$search_prenom.'">'; print '<input class="flat" type="text" name="search_firstname" size="10" value="'.$search_firstname.'">';
print '</td>'; print '</td>';
// Other // Other
print '<td class="liste_titre">'; print '<td class="liste_titre">';
@@ -452,8 +452,8 @@ if ($object->fetch($id) >= 0)
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>'.$obj->email.'</td>'; print '<td>'.$obj->email.'</td>';
print '<td>'.$obj->nom.'</td>'; print '<td>'.$obj->lastname.'</td>';
print '<td>'.$obj->prenom.'</td>'; print '<td>'.$obj->firstname.'</td>';
print '<td>'.$obj->other.'</td>'; print '<td>'.$obj->other.'</td>';
print '<td align="center">'; print '<td align="center">';
if (empty($obj->source_id) || empty($obj->source_type)) if (empty($obj->source_id) || empty($obj->source_type))

View File

@@ -174,7 +174,7 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
// On choisit les mails non deja envoyes pour ce mailing (statut=0) // On choisit les mails non deja envoyes pour ce mailing (statut=0)
// ou envoyes en erreur (statut=-1) // 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 .= " FROM ".MAIN_DB_PREFIX."mailing_cibles as mc";
$sql .= " WHERE mc.statut < 1 AND mc.fk_mailing = ".$object->id; $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); $obj = $db->fetch_object($resql);
// sendto en RFC2822 // 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, ... // Make substitutions on topic and body. From (AA=YY;BB=CC;...) we keep YY, CC, ...
$other=explode(';',$obj->other); $other=explode(';',$obj->other);
@@ -224,8 +224,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>', '__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>', '__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>', '__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
'__LASTNAME__' => $obj->nom, '__LASTNAME__' => $obj->lastname,
'__FIRSTNAME__' => $obj->prenom, '__FIRSTNAME__' => $obj->firstname,
'__OTHER1__' => $other1, '__OTHER1__' => $other1,
'__OTHER2__' => $other2, '__OTHER2__' => $other2,
'__OTHER3__' => $other3, '__OTHER3__' => $other3,

View File

@@ -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 adresse address text;
alter table llx_don CHANGE COLUMN ville town 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 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_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_entrepot CHANGE COLUMN ville town text;
alter table llx_societe CHANGE COLUMN ville town text; alter table llx_societe CHANGE COLUMN ville town text;
alter table llx_socpeople CHANGE COLUMN ville town text; alter table llx_socpeople CHANGE COLUMN ville town text;

View File

@@ -46,7 +46,6 @@ class User extends CommonObject
var $ref_ext; var $ref_ext;
var $ldap_sid; var $ldap_sid;
var $search_sid; var $search_sid;
var $prenom; // TODO deprecated
var $lastname; var $lastname;
var $firstname; var $firstname;
var $note; var $note;
@@ -190,7 +189,6 @@ class User extends CommonObject
$this->ldap_sid = $obj->ldap_sid; $this->ldap_sid = $obj->ldap_sid;
$this->lastname = $obj->name; $this->lastname = $obj->name;
$this->prenom = $obj->firstname; // TODO deprecated
$this->firstname = $obj->firstname; $this->firstname = $obj->firstname;
$this->login = $obj->login; $this->login = $obj->login;
@@ -908,7 +906,6 @@ class User extends CommonObject
// Positionne parametres // Positionne parametres
$this->admin = 0; $this->admin = 0;
$this->prenom = $contact->prenom; // TODO deprecated
$this->lastname = $contact->lastname; $this->lastname = $contact->lastname;
$this->firstname = $contact->firstname; $this->firstname = $contact->firstname;
$this->email = $contact->email; $this->email = $contact->email;
@@ -1087,7 +1084,6 @@ class User extends CommonObject
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass); dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
// Clean parameters // Clean parameters
$this->prenom = trim($this->prenom); // deprecated
$this->lastname = trim($this->lastname); $this->lastname = trim($this->lastname);
$this->firstname = trim($this->firstname); $this->firstname = trim($this->firstname);
$this->login = trim($this->login); $this->login = trim($this->login);
@@ -1184,7 +1180,6 @@ class User extends CommonObject
if ($result >= 0) if ($result >= 0)
{ {
$adh->prenom=$this->firstname; // deprecated
$adh->firstname=$this->firstname; $adh->firstname=$this->firstname;
$adh->lastname=$this->lastname; $adh->lastname=$this->lastname;
$adh->login=$this->login; $adh->login=$this->login;
@@ -1723,7 +1718,7 @@ class User extends CommonObject
/** /**
* Return a link to the user card (with optionnaly the picto) * 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 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 * @param string $option On what the link point to
@@ -1941,7 +1936,6 @@ class User extends CommonObject
$this->ref = 'SPECIMEN'; $this->ref = 'SPECIMEN';
$this->specimen=1; $this->specimen=1;
$this->prenom='SPECIMEN'; // deprecated
$this->lastname='DOLIBARR'; $this->lastname='DOLIBARR';
$this->firstname='SPECIMEN'; $this->firstname='SPECIMEN';
$this->note='This is a note'; $this->note='This is a note';

View File

@@ -102,9 +102,9 @@ if ($id > 0)
print '<td colspan="2">'.$fuser->lastname.'</td>'; print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n"; print "</tr>\n";
// Prenom // Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td colspan="2">'.$fuser->name.'</td>'; print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n"; print "</tr>\n";
print "</table>\n"; print "</table>\n";

View File

@@ -175,7 +175,7 @@ if ($action == 'add' && $canadduser)
if (! $message) if (! $message)
{ {
$object->lastname = $_POST["lastname"]; $object->lastname = $_POST["lastname"];
$object->firstname = $_POST["prenom"]; $object->firstname = $_POST["firstname"];
$object->login = $_POST["login"]; $object->login = $_POST["login"];
$object->admin = $_POST["admin"]; $object->admin = $_POST["admin"];
$object->office_phone = $_POST["office_phone"]; $object->office_phone = $_POST["office_phone"];
@@ -316,7 +316,7 @@ if ($action == 'update' && ! $_POST["cancel"])
$object->oldcopy=dol_clone($object); $object->oldcopy=dol_clone($object);
$object->lastname = GETPOST("lastname"); $object->lastname = GETPOST("lastname");
$object->firstname = GETPOST("prenom"); $object->firstname = GETPOST("firstname");
$object->login = GETPOST("login"); $object->login = GETPOST("login");
$object->pass = GETPOST("password"); $object->pass = GETPOST("password");
$object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin $object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin
@@ -547,7 +547,7 @@ if ($action == 'adduserldap')
foreach ($ldapusers as $key => $attribute) foreach ($ldapusers as $key => $attribute)
{ {
$ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME]; $ldap_lastname = $attribute[$conf->global->LDAP_FIELD_NAME];
$ldap_prenom = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME]; $ldap_firstname = $attribute[$conf->global->LDAP_FIELD_FIRSTNAME];
$ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN]; $ldap_login = $attribute[$conf->global->LDAP_FIELD_LOGIN];
$ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA]; $ldap_loginsmb = $attribute[$conf->global->LDAP_FIELD_LOGIN_SAMBA];
$ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD]; $ldap_pass = $attribute[$conf->global->LDAP_FIELD_PASSWORD];
@@ -708,17 +708,17 @@ if (($action == 'create') || ($action == 'adduserldap'))
} }
print '</td></tr>'; print '</td></tr>';
// Prenom // Firstname
print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>'; print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'; print '<td>';
if (! empty($ldap_prenom)) if (! empty($ldap_firstname))
{ {
print '<input type="hidden" name="prenom" value="'.$ldap_prenom.'">'; print '<input type="hidden" name="firstname" value="'.$ldap_firstname.'">';
print $ldap_prenom; print $ldap_firstname;
} }
else else
{ {
print '<input size="30" type="text" name="prenom" value="'.GETPOST('prenom').'">'; print '<input size="30" type="text" name="firstname" value="'.GETPOST('firstname').'">';
} }
print '</td></tr>'; print '</td></tr>';
@@ -1087,7 +1087,7 @@ else
// Firstname // Firstname
print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>'; print '<tr><td valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$object->prenom.'</td>'; print '<td>'.$object->Firstname.'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
// Position/Job // Position/Job
@@ -1587,12 +1587,12 @@ else
print '<td>'; print '<td>';
if ($caneditfield && !$object->ldap_sid) if ($caneditfield && !$object->ldap_sid)
{ {
print '<input size="30" type="text" class="flat" name="prenom" value="'.$object->prenom.'">'; print '<input size="30" type="text" class="flat" name="Firstname" value="'.$object->Firstname.'">';
} }
else else
{ {
print '<input type="hidden" name="prenom" value="'.$object->prenom.'">'; print '<input type="hidden" name="Firstname" value="'.$object->Firstname.'">';
print $object->prenom; print $object->Firstname;
} }
print '</td></tr>'; print '</td></tr>';

View File

@@ -105,9 +105,9 @@ print '<tr><td width="25%" valign="top">'.$langs->trans("Lastname").'</td>';
print '<td>'.$fuser->lastname.'</td>'; print '<td>'.$fuser->lastname.'</td>';
print "</tr>\n"; print "</tr>\n";
// Prenom // Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$fuser->prenom.'</td>'; print '<td>'.$fuser->firstname.'</td>';
print "</tr>\n"; print "</tr>\n";
// Login // Login

View File

@@ -105,8 +105,8 @@ if ($id)
print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$fuser->lastname.'&nbsp;</td>'; print '<tr><td>'.$langs->trans("Lastname").'</td><td class="valeur" colspan="3">'.$fuser->lastname.'&nbsp;</td>';
print '</tr>'; print '</tr>';
// Prenom // Firstname
print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$fuser->prenom.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Firstname").'</td><td class="valeur" colspan="3">'.$fuser->firstname.'&nbsp;</td></tr>';
// Login // Login
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$fuser->login.'&nbsp;</td></tr>'; print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur" colspan="3">'.$fuser->login.'&nbsp;</td></tr>';

View File

@@ -135,9 +135,9 @@ print '<tr><td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
print '<td colspan="2">'.$fuser->lastname.'</td>'; print '<td colspan="2">'.$fuser->lastname.'</td>';
print "</tr>\n"; print "</tr>\n";
// Prenom // FirstName
print '<tr><td width="25%" valign="top">'.$langs->trans("FirstName").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
print '<td colspan="2">'.$fuser->prenom.'</td>'; print '<td colspan="2">'.$fuser->firstname.'</td>';
print "</tr>\n"; print "</tr>\n";
print '</table><br>'; print '</table><br>';

View File

@@ -261,7 +261,7 @@ print '</tr>'."\n";
// Firstname // Firstname
print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Firstname").'</td>';
print '<td>'.$fuser->prenom.'</td>'; print '<td>'.$fuser->firstname.'</td>';
print '</tr>'."\n"; print '</tr>'."\n";
print '</table><br>'; print '</table><br>';