From 5d3ab26463bd5224044e63340629e0b58fab2631 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 24 Feb 2013 12:26:01 +0100 Subject: [PATCH] some fix for english language standardization --- htdocs/societe/class/societe.class.php | 18 +++++++++--------- htdocs/societe/notify/fiche.php | 8 ++++---- htdocs/societe/soc.php | 8 ++++---- ...mail_unpaid_invoices_to_representatives.php | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 72ae2b04922..e0d351ef084 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1328,7 +1328,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); $reparray[$i]['id']=$obj->rowid; - $reparray[$i]['name']=$obj->name; + $reparray[$i]['lastname']=$obj->lastname; $reparray[$i]['firstname']=$obj->firstname; $i++; } @@ -1608,7 +1608,7 @@ class Societe extends CommonObject { $contact_property = array(); - $sql = "SELECT rowid, email, phone_mobile, name, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = '".$this->id."'"; @@ -1624,7 +1624,7 @@ class Societe extends CommonObject $obj = $this->db->fetch_object($resql); if ($mode == 'email') $property=$obj->email; else if ($mode == 'mobile') $property=$obj->phone_mobile; - $contact_property[$obj->rowid] = trim($obj->firstname." ".$obj->name)." <".$property.">"; + $contact_property[$obj->rowid] = trim($obj->firstname." ".$obj->lastname)." <".$property.">"; $i++; } } @@ -1646,7 +1646,7 @@ class Societe extends CommonObject { $contacts = array(); - $sql = "SELECT rowid, name, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'"; + $sql = "SELECT rowid, lastname, firstname FROM ".MAIN_DB_PREFIX."socpeople WHERE fk_soc = '".$this->id."'"; $resql=$this->db->query($sql); if ($resql) { @@ -1657,7 +1657,7 @@ class Societe extends CommonObject while ($i < $nump) { $obj = $this->db->fetch_object($resql); - $contacts[$obj->rowid] = $obj->firstname." ".$obj->name; + $contacts[$obj->rowid] = $obj->firstname." ".$obj->lastname; $i++; } } @@ -1680,7 +1680,7 @@ class Societe extends CommonObject { $contact_property=''; - $sql = "SELECT rowid, email, phone_mobile, name, firstname"; + $sql = "SELECT rowid, email, phone_mobile, lastname, firstname"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE rowid = '".$rowid."'"; @@ -1693,7 +1693,7 @@ class Societe extends CommonObject { $obj = $this->db->fetch_object($resql); - if ($mode == 'email') $contact_property = "$obj->firstname $obj->name <$obj->email>"; + if ($mode == 'email') $contact_property = "$obj->firstname $obj->lastname <$obj->email>"; else if ($mode == 'mobile') $contact_property = $obj->phone_mobile; } return $contact_property; @@ -2506,8 +2506,8 @@ class Societe extends CommonObject $this->state_id=empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)?'':$conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT; $this->note=empty($conf->global->MAIN_INFO_SOCIETE_NOTE)?'':$conf->global->MAIN_INFO_SOCIETE_NOTE; - $this->nom=$this->name; // deprecated - $this->cp=$this->zip; // deprecated + $this->nom=$this->name; // deprecated + $this->cp=$this->zip; // deprecated // We define country_id, country_code and country $country_id=$country_code=$country_label=''; diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 9a36e3fba12..9de9bdcea33 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -269,7 +269,7 @@ if ($result > 0) // Line with titles print ''; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'"width="45%"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'"width="45%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'"width="35%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),"fiche.php","",'',$param,'"width="10%"',$sortfield,$sortorder); print_liste_field_titre('','',''); @@ -278,7 +278,7 @@ if ($result > 0) // List of notifications for contacts $sql = "SELECT n.rowid, n.type,"; $sql.= " a.code, a.label,"; - $sql.= " c.rowid as contactid, c.name, c.firstname, c.email"; + $sql.= " c.rowid as contactid, c.lastname, c.firstname, c.email"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; $sql.= " ".MAIN_DB_PREFIX."notify_def as n,"; $sql.= " ".MAIN_DB_PREFIX."socpeople c"; @@ -347,14 +347,14 @@ if ($result > 0) // Line with titles print '
'; print ''; - print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.name",'',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Contact"),"fiche.php","c.lastname",'',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Action"),"fiche.php","a.titre",'',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),"fiche.php","a.daten",'',$param,'align="right"',$sortfield,$sortorder); print ''; // List $sql = "SELECT n.rowid, n.daten, n.email, n.objet_type, n.objet_id,"; - $sql.= " c.rowid as id, c.name, c.firstname, c.email,"; + $sql.= " c.rowid as id, c.lastname, c.firstname, c.email,"; $sql.= " a.code, a.label"; $sql.= " FROM ".MAIN_DB_PREFIX."c_action_trigger as a,"; $sql.= " ".MAIN_DB_PREFIX."notify as n, "; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index c196327e5a2..6140ccf4261 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -122,7 +122,7 @@ if (empty($reshook)) { $object->name = GETPOST('nom'); } - $object->address = GETPOST('adresse'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id'); @@ -590,7 +590,7 @@ else $object->code_client = GETPOST('code_client'); $object->fournisseur = GETPOST('fournisseur')?GETPOST('fournisseur'):$object->fournisseur; $object->code_fournisseur = GETPOST('code_fournisseur'); - $object->address = GETPOST('adresse'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->state_id = GETPOST('departement_id'); @@ -808,7 +808,7 @@ else } // Address - print ''; @@ -1086,7 +1086,7 @@ else $object->code_client = GETPOST('code_client'); $object->fournisseur = GETPOST('fournisseur'); $object->code_fournisseur = GETPOST('code_fournisseur'); - $object->address = GETPOST('adresse'); + $object->address = GETPOST('address'); $object->zip = GETPOST('zipcode'); $object->town = GETPOST('town'); $object->country_id = GETPOST('country_id')?GETPOST('country_id'):$mysoc->country_id; diff --git a/scripts/invoices/email_unpaid_invoices_to_representatives.php b/scripts/invoices/email_unpaid_invoices_to_representatives.php index bf209b63f4a..19741c5f7a0 100644 --- a/scripts/invoices/email_unpaid_invoices_to_representatives.php +++ b/scripts/invoices/email_unpaid_invoices_to_representatives.php @@ -47,7 +47,7 @@ require_once (DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php"); $error = 0; -$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.name, u.firstname, u.email"; +$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.lastname, u.firstname, u.email"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sql .= " , ".MAIN_DB_PREFIX."societe as s"; $sql .= " , ".MAIN_DB_PREFIX."societe_commerciaux as sc";
'.$langs->trans('Address').'