X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvcard.inc.php;h=dfdadaad4113b9903a49de47fe3fc46b49318ab8;hb=e0ee31204dbb8e43870716190e4549257416fcb8;hp=b62d09f43a33e1bd44d18f579a849d687ecb3bcb;hpb=020ad86dadf7f82e4d93414391eeb2f95e94189f;p=platal.git diff --git a/include/vcard.inc.php b/include/vcard.inc.php index b62d09f..dfdadaa 100644 --- a/include/vcard.inc.php +++ b/include/vcard.inc.php @@ -1,6 +1,6 @@ addWork($pro['entreprise'], null, $pro['poste'], $pro['fonction'], - $street, null, null, $pro['postcode'], $pro['city'], $pro['region'], @$pro['country']); - if (!empty($pro['tel'])) { - $entry->addTel($group, $pro['tel']); - } - if (!empty($pro['fax'])) { - $entry->addTel($group, $pro['fax'], true); - } - if (!empty($pro['email'])) { - $entry->addMail($group, $pro['email']); + if (!empty($user['adr_pro'])) { + foreach ($user['adr_pro'] as $pro) { + $street = array($adr['adr1']); + if (!empty($pro['adr2'])) { + $street[] = $pro['adr2']; + } + if (!empty($pro['adr3'])) { + $street[] = $pro['adr3']; + } + $group = $entry->addWork($pro['entreprise'], null, $pro['poste'], $pro['fonction'], + $street, null, null, $pro['postcode'], $pro['city'], $pro['region'], @$pro['country']); + if (!empty($pro['tel'])) { + $entry->addTel($group, $pro['tel']); + } + if (!empty($pro['fax'])) { + $entry->addTel($group, $pro['fax'], true); + } + if (!empty($pro['email'])) { + $entry->addMail($group, $pro['email']); + } } }