[Tickets #6606] Probl

bugs at horde.org bugs at horde.org
Mon Apr 14 15:46:19 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6606
-----------------------------------------------------------------------
 Ticket             | 6606
 Created By         | almarin at um.es
 Summary            | Probl
 Queue              | Kronolith
 Version            | HEAD
 Type               | Bug
 State              | Unconfirmed
 Priority           | 1. Low
 Milestone          |
 Patch              |
 Owners             |
-----------------------------------------------------------------------


almarin at um.es (2008-04-14 11:46) wrote:

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 event,
some of them 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;
+     }
+  }

In that solution, i allways suppose that only one event has the correct
attendee info (copies souldn't), so i examine every copy returned by
getByUID.

I did not make a path for that because i don't know if my solution is the
best one.





More information about the bugs mailing list