From 71cc6b012781e00437c86a17c2a82734fb901c2f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 13 Jul 2005 14:07:15 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20l'adresse=20et=20le=20fax=20du=20contact?= =?UTF-8?q?=20n'=E9tait=20pas=20enregistr=E9=20sous=20ldap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/contact.class.php | 18 +++++++++++++----- htdocs/contact/fiche.php | 8 ++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php index febce704950..3a7a10d0953 100644 --- a/htdocs/contact.class.php +++ b/htdocs/contact.class.php @@ -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); diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index fadf9564367..1fd3257bdef 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -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 'Tel Perso'; - print ''.$langs->trans("Address").''; + print ''.$langs->trans("Address").''; print 'Portable'; @@ -314,7 +314,7 @@ elseif ($_GET["action"] == 'edit') print 'Tel Perso'; - print ''.$langs->trans("Address").''; + print ''.$langs->trans("Address").''; print 'Portable';