mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:26 +01:00
sync issues with EMAIL;INTERNET;WORK
This commit is contained in:
parent
55dae8ce7b
commit
282401919a
@ -64,7 +64,7 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
{
|
{
|
||||||
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar/vcard.php');
|
require_once(EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar/vcard.php');
|
||||||
|
|
||||||
$vCard =& new Horde_iCalendar_vcard;
|
$vCard = new Horde_iCalendar_vcard;
|
||||||
|
|
||||||
if(!is_array($this->supportedFields)) {
|
if(!is_array($this->supportedFields)) {
|
||||||
$this->setSupportedFields();
|
$this->setSupportedFields();
|
||||||
@ -111,7 +111,7 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
case 'jpegphoto':
|
case 'jpegphoto':
|
||||||
if(!empty($value))
|
if(!empty($value))
|
||||||
{
|
{
|
||||||
error_log(__FILE__ ."\nThis vcard contains a JPEG\n '".$value."'");
|
//error_log(__FILE__ ."\nThis vcard contains a JPEG\n '".$value."'");
|
||||||
$options['ENCODING'] = 'BASE64';
|
$options['ENCODING'] = 'BASE64';
|
||||||
$options['TYPE'] = 'JPEG';
|
$options['TYPE'] = 'JPEG';
|
||||||
$value = base64_encode($value);
|
$value = base64_encode($value);
|
||||||
@ -169,7 +169,7 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
$vCard->setParameter($vcardField, $options);
|
$vCard->setParameter($vcardField, $options);
|
||||||
}
|
}
|
||||||
$result = $vCard->exportvCalendar();
|
$result = $vCard->exportvCalendar();
|
||||||
//error_log(__FILE__ . __METHOD__ ."\nvcard:".print_r($result,true));
|
//error_log(__LINE__.__FILE__ . __METHOD__ ."\export vcard:".print_r($result,true));
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -781,15 +781,23 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'EMAIL;WORK':
|
case 'EMAIL;WORK':
|
||||||
|
$akey = false;
|
||||||
|
foreach($this->supportedFields as $tag => $value)
|
||||||
|
{
|
||||||
|
if(in_array ('email', $value))
|
||||||
|
{
|
||||||
|
$akey = $tag;
|
||||||
|
}
|
||||||
if(!isset($rowNames['EMAIL;INTERNET;WORK']))
|
if(!isset($rowNames['EMAIL;INTERNET;WORK']))
|
||||||
{
|
{
|
||||||
if(in_array ('#email_work', $value))
|
//error_log(__METHOD__.print_r($rowName,true).'#'.print_r($vcardKey,true));
|
||||||
|
if(is_array($value) && in_array ('#email_work', $value))
|
||||||
{
|
{
|
||||||
$akey = $tag;
|
$akey = $tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// error_log("key:$akey:$vcardKey");
|
// error_log("key:$akey:$vcardKey");
|
||||||
|
}
|
||||||
if( $akey && !empty($vcardValues[$vcardKey]['value']))
|
if( $akey && !empty($vcardValues[$vcardKey]['value']))
|
||||||
{
|
{
|
||||||
//error_log("$akey : ".print_r($vcardKey,true));
|
//error_log("$akey : ".print_r($vcardKey,true));
|
||||||
@ -873,7 +881,7 @@ class addressbook_vcal extends addressbook_bo
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->fixup_contact($contact);
|
$this->fixup_contact($contact);
|
||||||
//error_log(__FILE__ . __METHOD__ . "\nContact:\n " .print_r($contact,true));
|
//error_log(__LINE__.__FILE__ . __METHOD__ . "\nContact:\n " .print_r($contact,true));
|
||||||
return $contact;
|
return $contact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user