Supression des fullname de contact au profit de getFullName()
This commit is contained in:
parent
6e6de6d26d
commit
0e0e82a3e3
@ -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
|
||||
{
|
||||
|
||||
@ -405,7 +405,7 @@ if ($socid > 0)
|
||||
if ($obj->fk_contact) {
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->fk_contact);
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->getFullName($langs).'</a></td>';
|
||||
} else {
|
||||
print '<td> </td>';
|
||||
}
|
||||
@ -492,7 +492,7 @@ if ($socid > 0)
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($obj->fk_contact);
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.'</a></td>';
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$contact->id.'">'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->getFullName($langs).'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -219,11 +219,6 @@ if ($lineid > 0)
|
||||
print "</td></tr>";
|
||||
}
|
||||
|
||||
/* Fonction remplacé par les contacts de contrat
|
||||
// Commerciaux
|
||||
print '<tr><td width="25%">'.$langs->trans("SalesRepresentativeFollowUp").'</td><td>'.$commercial_suivi->fullname.'</td>';
|
||||
print '<td width="25%">'.$langs->trans("SalesRepresentativeSignature").'</td><td>'.$commercial_signature->fullname.'</td></tr>';
|
||||
*/
|
||||
print "</table>";
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -899,7 +899,7 @@ else
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($fuser->contact_id);
|
||||
print ' / '.'<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->fullname,32).'</a>';
|
||||
print ' / '.'<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->getFullName($langs),32).'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1312,7 +1312,7 @@ else
|
||||
{
|
||||
$contact = new Contact($db);
|
||||
$contact->fetch($fuser->contact_id);
|
||||
print ' / '.'<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->fullname,32).'</a>';
|
||||
print ' / '.'<a href="'.DOL_URL_ROOT.'/contact/fiche.php?id='.$fuser->contact_id.'">'.img_object($langs->trans("ShowContact"),'contact').' '.dolibarr_trunc($contact->getFullName($langs),32).'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user