[horde] [turba] FBURL (freebusyUrl) field missing in vCard export and CardDAV
Jan Schneider
jan at horde.org
Thu May 29 08:21:16 UTC 2014
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
--
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject
More information about the horde
mailing list