[dev] kronolith listEvents

Karsten Fourmont fourmont at gmx.de
Sun Sep 25 09:30:04 PDT 2005


Hi,

SyncML now uses the _list api function.

I realized that the kronolith api function kronolith_list returns an 
array of IDs rather than an array of UIDs as expected. kronolith_lists 
returns an array ID => ID. This is produced by the listEvents function 
of the SQL driver. An ID => ID array seems somewhat redundandt: I 
propose to change this into an UID => ID array instead. I checked all 
usages of the driver's listEvents method and the change shouldn't have 
any side affects. The return value is always only used in the form $a = 
$k->listEvents() foreach($a as $event), so changing the array _key_ is fine.

The kolab driver listEvents currently returns a numbered array of UIDs 
(not IDs). To achieve a consistents behaviour, it should be changed,too 
(see patch).

The mcal driver's listEvents is even different: it creates an array of 
event objects. Strange. Is this used at all?

Anyhow. Is it OK do commit the attached patch? The kronolith_list 
function seems to expect the format I propse: with attached patch it 
returns guids as expected.

Cheers,
  Karsten

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kronolith_list_patch.txt
Url: http://lists.horde.org/archives/dev/attachments/20050925/49330617/kronolith_list_patch.txt


More information about the dev mailing list