[sync] SyncML improvements

John Capo jc at irbs.com
Sat May 6 07:00:52 PDT 2006


Quoting Martin Middeke (martin.middeke at gewus.de):
> 
> i recognized another thing:
> ORG:company; is interpreted as "company;" not "company"

That is a problem with escaping in Horde_iCalendar::_exportvData().

ADR;TYPE=HOME:\;\;\;\;\;\;
ADR;TYPE=WORK:\;\;\;\;\;\;

That function can not tell an empty field from a field containing
special characters that needs to be escaped.  I think special
characters need to be escaped at a lower level, probably in
Turba_Driver::tovCard().

Also, code is needed in Turba_Driver::tovCard() to populate the ORG field.

//            case 'company':
//                $vcard->setAttribute('ORG', $val);
//                break;
        

Further down where other multi element fields are generated.

        $a = array(
            VCARD_ORG_COMPANY   => isset($hash['company']) ? $hash['company'] : '',
            VCARD_ORG_DEPT      => isset($hash['department']) ? $hash['department'] : '',
        );  
        $vcard->setAttribute('ORG', implode(';', $a));

And some defines in lib/Horde/iCalendar/vcard.php

// Part numbers for ORG components.
define('VCARD_ORG_COMPANY',     0);
define('VCARD_ORG_DEPT',        1);

Sorry but I have too much debug cruft in the modified files to
generate patches.  There may be other multi element attributes that
need to be fixed.

I have been testing with the Nexthaus.com trial Outlook plugin.
Prior to the last Encoder/Decoder fixes, the Get command would fail
with compression enabled.  With compression disabled, the Get
command would fail in xml_parse() due to binary data in <HwV>.

<HwV>Windows 98 SE Intel Pentium II (MMX) (DIV) h\xf6\xe2^A\xc6\xff</HwV>

Now the trial Nexthaus version works fine but the purchased version
fails to sync.  It fails with a bad password message when it is
told to SlowSync.  It also fails with Scheduleworld so I suspect
it is a client problem.

John Capo
Tuffmail.com



More information about the sync mailing list