diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 333a96044ff..2c084faa5ce 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -118,9 +118,9 @@ if ($_POST["action"] == 'add_action') $actioncomm->label = trim($_POST["label"]); if (! $_POST["label"]) { - if ($_POST["actioncode"] == 'AC_RDV' && $contact->fullname) + if ($_POST["actioncode"] == 'AC_RDV' && $contact->getFullName($langs)) { - $actioncomm->label = $langs->trans("TaskRDVWith",$contact->fullname); + $actioncomm->label = $langs->trans("TaskRDVWith",$contact->getFullName($langs)); } else { diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 3506a100165..9f4c80d7f11 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -405,7 +405,7 @@ if ($socid > 0) if ($obj->fk_contact) { $contact = new Contact($db); $contact->fetch($obj->fk_contact); - print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.''; + print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->getFullName($langs).''; } else { print ' '; } @@ -492,7 +492,7 @@ if ($socid > 0) { $contact = new Contact($db); $contact->fetch($obj->fk_contact); - print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.''; + print ''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->getFullName($langs).''; } else { diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index 1e35722f4e1..231c56ba63f 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -146,7 +146,6 @@ class Contact // Nettoyage parametres $this->name=trim($this->name); $this->firstname=trim($this->firstname); - $this->fullname=$this->getFullName($langs); $this->email=trim($this->email); $this->phone_pro=trim($this->phone_pro); @@ -391,7 +390,6 @@ class Contact $this->firstname = $obj->firstname; $this->nom = $obj->name; $this->prenom = $obj->firstname; - $this->fullname = $this->getFullName($langs); $this->address = $obj->address; $this->adresse = $obj->address; // Todo: uniformiser le nom des variables @@ -724,7 +722,7 @@ class Contact /** * \brief Return full name (name+' '+lastname) - * \param lang Lang for output + * \param langs Lang for output * \param option 0=No option, 1=Add civility * \return string String with full name */ @@ -834,7 +832,6 @@ class Contact // Initialise paramètres $this->id=0; $this->specimen=1; - $this->fullname = 'DOLIBARR SPECIMEN'; $this->nom = 'DOLIBARR'; $this->name = $this->nom; $this->prenom = 'SPECIMEN'; diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 5dfc56cb4d8..a2bcbb7601d 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -51,7 +51,7 @@ $v->setProdId('Dolibarr '.DOL_VERSION); $v->setUid('DOLIBARR-CONTACTID-'.$contact->id); $v->setName($contact->name, $contact->firstname, "", "", ""); -$v->setFormattedName($contact->fullname); +$v->setFormattedName($contact->getFullName($langs)); // By default, all informations are for work (except phone_perso and phone_mobile) $v->setPhoneNumber($contact->phone_pro, "PREF;WORK;VOICE"); diff --git a/htdocs/contrat/ligne.php b/htdocs/contrat/ligne.php index 9efa4355f2c..ff3abc72ca9 100644 --- a/htdocs/contrat/ligne.php +++ b/htdocs/contrat/ligne.php @@ -219,11 +219,6 @@ if ($lineid > 0) print ""; } -/* Fonction remplacé par les contacts de contrat - // Commerciaux - print ''.$langs->trans("SalesRepresentativeFollowUp").''.$commercial_suivi->fullname.''; - print ''.$langs->trans("SalesRepresentativeSignature").''.$commercial_signature->fullname.''; -*/ print ""; diff --git a/htdocs/includes/triggers/interface_webcal.class.php b/htdocs/includes/triggers/interface_webcal.class.php index 07ec8a416b6..cd1f9849399 100644 --- a/htdocs/includes/triggers/interface_webcal.class.php +++ b/htdocs/includes/triggers/interface_webcal.class.php @@ -121,7 +121,7 @@ class InterfaceWebCal // Initialisation donnees (date,duree,texte,desc) if ($object->type_id == 5 && $object->contact->fullname) { - $libellecal =$langs->transnoentities("TaskRDVWith",$object->contact->fullname)."\n"; + $libellecal =$langs->transnoentities("TaskRDVWith",$object->contact->getFullName($langs))."\n"; $libellecal.=$object->note; } else diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 9c827a9560c..bad93db1c62 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -899,7 +899,7 @@ else { $contact = new Contact($db); $contact->fetch($fuser->contact_id); - print ' / '.''.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->fullname,32).''; + print ' / '.''.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->getFullName($langs),32).''; } } else @@ -1312,7 +1312,7 @@ else { $contact = new Contact($db); $contact->fetch($fuser->contact_id); - print ' / '.''.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->fullname,32).''; + print ' / '.''.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->getFullName($langs),32).''; } } else diff --git a/scripts/company/sync_contacts_dolibarr2ldap.php b/scripts/company/sync_contacts_dolibarr2ldap.php index 3a5ce40b35e..78d353aed34 100644 --- a/scripts/company/sync_contacts_dolibarr2ldap.php +++ b/scripts/company/sync_contacts_dolibarr2ldap.php @@ -85,7 +85,7 @@ if ($resql) $contact->id = $obj->rowid; $contact->fetch($contact->id); - print $langs->trans("UpdateContact")." rowid=".$contact->id." ".$contact->fullname; + print $langs->trans("UpdateContact")." rowid=".$contact->id." ".$contact->getFullName($langs); $info=$contact->_load_ldap_info(); $dn=$contact->_load_ldap_dn($info);