From: Michael J. Rubinsky Date: Fri, 25 Jun 2010 18:36:42 +0000 (-0400) Subject: Need to ensure the correct calendar is currently opened before calling the parent... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e746f98bc50c182296df72e19635edaadeff0b6d;p=horde.git Need to ensure the correct calendar is currently opened before calling the parent method. Due to the way Kronolith::getDriver() caches the driver, the driver's currently opened calendar can change while still within this method. Only took a day and half to track this down... --- diff --git a/kronolith/lib/Driver/Resource.php b/kronolith/lib/Driver/Resource.php index b73d952c0..b9c8cc8d1 100644 --- a/kronolith/lib/Driver/Resource.php +++ b/kronolith/lib/Driver/Resource.php @@ -35,11 +35,8 @@ class Kronolith_Driver_Resource extends Kronolith_Driver_Sql */ public function deleteEvent($event, $silent = false) { - /* Since this is the Kronolith_Resource's version of the event, if we - * delete it, we must also make sure to remove it from the event that - * it is attached to. Not sure if there is a better way to do - * this... */ $delete_event = $this->getEvent($event); + $uid = $delete_event->uid; $driver = Kronolith::getDriver(); $events = $driver->getByUID($uid, null, true); @@ -52,7 +49,7 @@ class Kronolith_Driver_Resource extends Kronolith_Driver_Sql $e->save(); } } - + $this->open($delete_event->calendar); parent::deleteEvent($event, $silent); }