[sync] An extra ";" in Company after syncing to PPC contact
Naoyuki Tai
ntai at smartfruit.com
Fri Mar 2 19:48:24 PST 2007
This makes more sense.
Index: Sync4j.php
===================================================================
RCS file: /repository/framework/SyncML/SyncML/Device/Sync4j.php,v
retrieving revision 1.27
diff -c -r1.27 Sync4j.php
*** Sync4j.php 14 Jan 2007 19:31:34 -0000 1.27
--- Sync4j.php 3 Mar 2007 03:47:23 -0000
***************
*** 244,250 ****
array('TYPE'=>'FAX'));
$vcard->setAttribute('EMAIL', $a['Email1Address']);
$vcard->setAttribute('TITLE', $a['JobTitle']);
! $vcard->setAttribute('ORG', $a['CompanyName']);
$vcard->setAttribute('NOTE', $a['Body']);
$vcard->setAttribute('URL', $a['WebPage']);
--- 244,257 ----
array('TYPE'=>'FAX'));
$vcard->setAttribute('EMAIL', $a['Email1Address']);
$vcard->setAttribute('TITLE', $a['JobTitle']);
! $vcard->setAttribute('ORG',
! str_replace(array('\r\n', ';', ':'),
! array('\\n', '\\;', '\\:'),
! $a['CompanyName']) .
! ';' .
! str_replace(array('\r\n', ';', ':'),
! array('\\n', '\\;', '\\:'),
! $a['Department']));
$vcard->setAttribute('NOTE', $a['Body']);
$vcard->setAttribute('URL', $a['WebPage']);
***************
*** 621,627 ****
break;
case 'ORG':
! $hash['CompanyName'] = $item['value'];
break;
case 'NOTE':
--- 628,640 ----
break;
case 'ORG':
! $values = preg_split('/(?<!\\\\);/',
trim($item['value']));
! $hash['CompanyName'] = str_replace(array('\\n', '\\N',
'\\;', '\\:'),
! array('\r\n', '\r\n', ';', ':'),
! $values[0]);
! $hash['Department'] = str_replace(array('\\n', '\\N',
'\\;', '\\:'),
! array('\r\n', '\r\n', ';', ':'),
! $values[1]);
break;
case 'NOTE':
More information about the sync
mailing list