[kronolith] lightning webdav and deleting events

Didi Rieder adrieder at sbox.tugraz.at
Tue Jun 17 17:45:50 UTC 2008


Quoting Didi Rieder <adrieder at sbox.tugraz.at>:

> Quoting Didi Rieder <adrieder at sbox.tugraz.at>:
>
>> Quoting Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Didi Rieder <adrieder at sbox.tugraz.at>:
>>>
>>>> Hi,
>>>>
>>>> is it normal that when I delete an event in lightning, it doesn't  
>>>> get deleted from kronolith and after reloading the remote  
>>>> calendar in ligthning the deleted event reappears?
>>>
>>> Only if you use the old, deprecated subscription URL for your calendar.
>>
>> Jan, thanks for your answer.
>>
>> I'm not exactly using the new subscription URL in form of:
>> <https://hordehost/horde/rpc.php/kronolith/username/username.ics>
>>
>> Kronolith tells me to use:
>> <https://hordehost/horde/rpc.php/kronolith/username@realm/username@realm.ics>
>>
>> and I had to extend this by also specifying the server for the IMP  
>> authentication mehtod:
>>
>> <https://hordehost/horde/rpc.php/kronolith/username@realm/username@realm.ics/?server=server>
>>
>> So could this be the problem? I can perfectly add and change  
>> events, but only deleting doesn't work.
>
> I found that the _kronolith_list() function in kronolith/lib/api.php  
> does not return
> any UIDs when called by _kronolith_put() for storing the currently  
> existings UIDs,
> so there will be nothing left to delete at the end of the  
> _kronolith_put() function.

....and this is due to the fact that in the _kronolith_list() function  
the $endstamp is set to 9999/12/31 by $endstamp = new  
Horde_Date(array('year' => 9999, 'month' => 12, 'day' => 31));


now in the following call of Kronolith::listEventIds which eventually calls
the dirvers (sql in my case) listEvents() function, one day gets added  
to the endstamp which is then 10000/01/01 and gets translated to  
'10000-01-01 00:00:00'
  for the sql queries. Queries with this date produce an sql error an  
so the evenid list remains empty in the end!

This problem can easily be fixed by using
$endstamp = new Horde_Date(array('year' => 9999, 'month' => 12, 'day' => 30));

as $endstamp in the api.

Didi

-- 
-------------------------
Didi Rieder
adrieder at sbox.tugraz.at
PGPKey ID: 3431D0B0
-------------------------



More information about the kronolith mailing list