[horde] [turba] FBURL (freebusyUrl) field missing in vCard export and CardDAV

Pulz, Joerg Joerg.Pulz at frm2.tum.de
Thu May 29 09:09:03 UTC 2014


----- Message from Jan Schneider <jan at horde.org> ---------
    Date: Thu, 29 May 2014 10:21:16 +0200
    From: Jan Schneider <jan at horde.org>
Subject: Re: [horde] [turba] FBURL (freebusyUrl) field missing in  
vCard export and CardDAV
      To: horde at lists.horde.org


> Zitat von "Pulz, Joerg" <Joerg.Pulz at frm2.tum.de>:
>
>> Hi,
>>
>> i stumbled over a problem when exporting address book entries as  
>> vCard or synching those using CardDAV.
>> The address book in question is LDAP based.
>> As the LDAP entries do not contain an attribute holding the  
>> freebusyUrl, i construct this field in backends.local.php:
>>
>> $cfgSources['localldap']['map']['freebusyUrl'] = array(
>>        'fields' => array('username'),
>>        'format' => Horde::url($GLOBALS['registry']->get('webroot',  
>> 'kronolith') . '/fb.php', true, -1) . '?u=%s
>> );
>>
>> This is working fine as long as i use the WebUI, the freebusyUrl  
>> field contains a valid URL and i can even use it in kronolith.
>>
>> When i try to export the address book as vCard or try to sync using  
>> CardDAV there is no FBURL field in the .vcf file at all, so it  
>> seems the information is getting lost somewhere on the road when  
>> generating the vCard file(s).
>>
>> I started to dig in the code to see where it happens and it seems  
>> to be related to my manual construction of the freebusyUrl in  
>> backends.local.php.
>>
>> If i change this to a valid (any) LDAP attribute e.g.:
>>
>> $cfgSources['localldap']['map']['freebusyUrl'] = 'dn';
>>
>> then the FBURL field is in the vCard file containing the exact the  
>> value of the LDAP attribute.
>> So it seems that during generation of vCard file(s) only values  
>> directly returned by the backend are honored and others are simply  
>> ignored.
>>
>> Just before line 547 in turbo/lib/Application.php
>>
>>                foreach ($results as $ob) {
>>                    if ($vcard) {
>>                        $data[] = $driver->tovCard($ob, $version,  
>> null, true);
>>
>> the object contains all data e.g.:
>>
>>      ["freebusyUrl"]=>
>>      array(2) {
>>        ["fields"]=>
>>        array(1) {
>>          [0]=>
>>          string(8) "username"
>>        }
>>        ["format"]=>
>>        string(48) "https://server.domain.tld/kronolith/fb.php?u=%s"
>>      }
>>
>> but "freebusyUrl" is missing in $fields e.g.:
>>
>>    ["fields"]=>
>>    array(24) {
>>      ["__key"]=>
>>      string(2) "dn"
>>      ["__uid"]=>
>>      string(3) "uid"
>>      ["name"]=>
>>      string(2) "cn"
>>      ["email"]=>
>>      string(4) "mail"
>>      ["homePhone"]=>
>>      string(9) "homephone"
>>      ["workPhone"]=>
>>      string(15) "telephonenumber"
>>      ["cellPhone"]=>
>>      string(21) "mobiletelephonenumber"
>>      ["homeAddress"]=>
>>      string(17) "homepostaladdress"
>>      ["firstname"]=>
>>      string(9) "givenName"
>>      ["lastname"]=>
>>      string(2) "sn"
>>      ["username"]=>
>>      string(3) "uid"
>>      ["uidnumber"]=>
>>      string(9) "uidNumber"
>>      ["gidnumber"]=>
>>      string(9) "gidNumber"
>>      ["gecos"]=>
>>      string(5) "gecos"
>>      ["homedirectory"]=>
>>      string(13) "homeDirectory"
>>      ["loginshell"]=>
>>      string(10) "loginShell"
>>      ["fax"]=>
>>      string(24) "facsimileTelephoneNumber"
>>      ["pager"]=>
>>      string(5) "pager"
>>      ["workRoom"]=>
>>      string(10) "roomNumber"
>>      ["department"]=>
>>      string(16) "departmentNumber"
>>      ["company"]=>
>>      string(2) "ou"
>>      ["workStreet"]=>
>>      string(13) "postalAddress"
>>      ["workCity"]=>
>>      string(10) "postalCode"
>>      ["workCountry"]=>
>>      string(2) "st"
>>    }
>>
>> As $fields is honored by turba's "tovCard" the freebusyUrl  
>> information get's lost there.
>>
>> Is there a chance to change the code that self constructed values  
>> are honored during vCard generation instead of only using attribute  
>> values returned by the LDAP backend itself? This would be really  
>> helpful as modifying the complete LDAP directory to add a real  
>> attribute that holds the freebusyUrl is not an option.
>>
>> Kind regards
>> Joerg
>
> http://bugs.horde.org/ticket/12915
>

----- End message from Jan Schneider <jan at horde.org> -----

Jan,

thanks for your response.
I was already aware of this ticket, but that is not related to the  
problem i described above.
To clarify:
- LDAP based address book
- If freebusyUrl is set to be an exact LDAP attribute FBURL is in the  
vCard and shown in the WebUi
- If freebusyUrl is hand-crafted in backends.local.php (see above) it  
is not included in the vCard but shown in the WebUi

So, as long as freebusyUrl is an exact LDAP attribute it is in $fields  
and honored by turba's tovCard, if it is hand-crafted, as in my case,  
it is not in $fields and therefor ignored by turba's tovCard.

Please take a look again at my first message for details.

Kind regards
Joerg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 1330 bytes
Desc: PGP Public Key
URL: <http://lists.horde.org/archives/horde/attachments/20140529/81d1ff0d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: PGP Digital Signature
URL: <http://lists.horde.org/archives/horde/attachments/20140529/81d1ff0d/attachment-0003.bin>


More information about the horde mailing list