Fix: l'adresse et le fax du contact n'tait pas enregistr sous ldap
This commit is contained in:
parent
79c8d176d4
commit
71cc6b0127
@ -178,7 +178,8 @@ class Contact
|
||||
$info["objectclass"][0] = "top";
|
||||
$info["objectclass"][1] = "person";
|
||||
$info["objectclass"][2] = "organizationalPerson";
|
||||
$info["objectclass"][3] = "inetOrgPerson";
|
||||
//$info["objectclass"][3] = "inetOrgPerson";
|
||||
$info["objectclass"][3] = "user";
|
||||
|
||||
$info["cn"] = $this->firstname." ".$this->name;
|
||||
$info["sn"] = $this->name;
|
||||
@ -192,6 +193,7 @@ class Contact
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($this->socid);
|
||||
$info["o"] = $soc->nom;
|
||||
$info["company"] = $soc->nom;
|
||||
|
||||
if ($soc->client == 1)
|
||||
$info["businessCategory"] = "Clients";
|
||||
@ -203,8 +205,8 @@ class Contact
|
||||
|
||||
if ($soc->ville)
|
||||
{
|
||||
if ($soc->address)
|
||||
$info["street"] = $soc->address;
|
||||
if ($soc->adresse)
|
||||
$info["streetAddress"] = $soc->adresse;
|
||||
|
||||
if ($soc->cp)
|
||||
$info["postalCode"] = $soc->cp;
|
||||
@ -221,6 +223,9 @@ class Contact
|
||||
|
||||
if ($this->phone_mobile)
|
||||
$info["mobile"] = dolibarr_print_phone($this->phone_mobile);
|
||||
|
||||
if ($this->fax)
|
||||
$info["facsimileTelephoneNumber"] = dolibarr_print_phone($this->fax);
|
||||
|
||||
if ($this->note)
|
||||
$info["description"] = ($this->note);
|
||||
@ -266,8 +271,8 @@ class Contact
|
||||
|
||||
if ($soc->ville)
|
||||
{
|
||||
if ($soc->address)
|
||||
$info["street"] = utf8_encode($soc->address);
|
||||
if ($soc->adresse)
|
||||
$info["street"] = utf8_encode($soc->adresse);
|
||||
|
||||
if ($soc->cp)
|
||||
$info["postalCode"] = utf8_encode($soc->cp);
|
||||
@ -284,6 +289,9 @@ class Contact
|
||||
|
||||
if ($this->phone_mobile)
|
||||
$info["mobile"] = dolibarr_print_phone($this->phone_mobile);
|
||||
|
||||
if ($this->fax)
|
||||
$info["facsimileTelephoneNumber"] = dolibarr_print_phone($this->fax);
|
||||
|
||||
if ($this->note)
|
||||
$info["description"] = ($this->note);
|
||||
|
||||
@ -76,7 +76,7 @@ if ($_POST["action"] == 'add')
|
||||
$contact->firstname = $_POST["firstname"];
|
||||
$contact->civilite_id = $_POST["civilite_id"];
|
||||
$contact->poste = $_POST["poste"];
|
||||
$contact->address = $_POST["adresse"];
|
||||
$contact->address = $_POST["address"];
|
||||
$contact->cp = $_POST["cp"];
|
||||
$contact->ville = $_POST["ville"];
|
||||
$contact->email = $_POST["email"];
|
||||
@ -118,7 +118,7 @@ if ($_POST["action"] == 'update')
|
||||
$contact->civilite_id = $_POST["civilite_id"];
|
||||
$contact->poste = $_POST["poste"];
|
||||
|
||||
$contact->address = $_POST["adresse"];
|
||||
$contact->address = $_POST["address"];
|
||||
$contact->cp = $_POST["cp"];
|
||||
$contact->ville = $_POST["ville"];
|
||||
|
||||
@ -254,7 +254,7 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><input name="adresse" type="text" size="50" maxlength="80"></td>';
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><input name="address" type="text" size="50" maxlength="80"></td>';
|
||||
|
||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
||||
|
||||
@ -314,7 +314,7 @@ elseif ($_GET["action"] == 'edit')
|
||||
|
||||
print '<td>Tel Perso</td><td><input name="phone_perso" type="text" size="18" maxlength="80" value="'.$contact->phone_perso.'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><input name="adresse" type="text" size="50" maxlength="80" value="'.$contact->address.'"></td>';
|
||||
print '<tr><td>'.$langs->trans("Address").'</td><td colspan="3"><input name="address" type="text" size="50" maxlength="80" value="'.$contact->address.'"></td>';
|
||||
|
||||
print '<td>Portable</td><td><input name="phone_mobile" type="text" size="18" maxlength="80" value="'.$contact->phone_mobile.'"></td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user