[kronolith] Problen with attend.php

Chuck Hagenbuch chuck at horde.org
Mon Apr 14 15:37:46 UTC 2008


Quoting Alfonso Marí­n Marí­n <almarin at um.es>:

> 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.

Yes, please do. Thanks!

-chuck

-- 
"I have concerns that we are not behaving like a mature, responsible,  
collection of interdependent organisms." - Rick O.


More information about the kronolith mailing list