forked from extern/egroupware
* eMail: import of VCARD; opening an already imported VCARD as addressbook-entry failed, and VCARD was offered for download; Fixed -> as the expectation was/is that the already imported vcard (found via uid) is opened as addressbook entry (data merged)
This commit is contained in:
parent
553db29e5d
commit
0855d84dfb
@ -1246,12 +1246,18 @@ pre {
|
||||
{
|
||||
$addressbook_vcal = new addressbook_vcal();
|
||||
$vcard = $addressbook_vcal->vcardtoegw($attachment['attachment']);
|
||||
//error_log(print_r($vcard,true));
|
||||
if ($vcard['uid']) $contact = $addressbook_vcal->find_contact($vcard,false);
|
||||
if ($vcard['uid'])
|
||||
{
|
||||
$vcard['uid'] = trim($vcard['uid']);
|
||||
//error_log(__METHOD__.__LINE__.print_r($vcard,true));
|
||||
$contact = $addressbook_vcal->find_contact($vcard,false);
|
||||
}
|
||||
if (!$contact) $contact = null;
|
||||
// if there are not enough fields in the vcard (or the parser was unable to correctly parse the vcard (as of VERSION:3.0 created by MSO))
|
||||
if ($contact || count($vcard)>2) $contact = $addressbook_vcal->addVCard($attachment['attachment'],$contact,true);
|
||||
//error_log(__METHOD__.$contact);
|
||||
if ($contact || count($vcard)>2)
|
||||
{
|
||||
$contact = $addressbook_vcal->addVCard($attachment['attachment'],(is_array($contact)?array_shift($contact):$contact),true);
|
||||
}
|
||||
if ((int)$contact > 0)
|
||||
{
|
||||
$vars = array(
|
||||
|
Loading…
Reference in New Issue
Block a user