[kronolith] Problen with attend.php

Alfonso Marí­n Marí­n almarin at um.es
Mon Apr 14 09:42:14 UTC 2008


Hello list,

We have noticed a problem when people try to accept or decline an even 
using the alternative links provided with iTip messages.

Other people uses calendar clients like lightning/sunbird mapped to 
kronolith using webdav, or outlook+funambol using syncml. Everytime that 
one user accept an event, an entry on kronolith_events is created with 
the same event_uid, but without any attendee info

The problem appears when a user tries to accept an event using the link 
provided. attend.php, the script which updates the status, uses (line 46):

$event = $kronolith_driver->getByUID($uid);

getByUID returns the first copy of an event (remember that no session 
has been started), but maybe, on BD exists other copies of the events, 
some of then without attendees. In that case, kronolith returns a "You 
are not an attendee of the specified event." message.

I have solved the problem like this:

-  $event = $kronolith_driver->getByUID($uid);
+  $events = $kronolith_driver->getByUID($uid,true);
+  foreach ($events as $e){
+     if ($e->hasAttendee($user)){
+        $event=$e;
+     }
+  }

But i'm not sure if it is the best choice.

I can fire a bug if necessary.

-- 
Alfonso Marín Marín
Sección de Telemática - ATICA
Universidad de Murcia
http://www.um.es/atica
Tlf: 968 39 8742


More information about the kronolith mailing list