Delete the events that represent exceptions to a recurring event when deleting the...
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 19 Apr 2010 21:45:51 +0000 (17:45 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 19 Apr 2010 21:45:51 +0000 (17:45 -0400)
Also get caught up on CHANGES

kronolith/docs/CHANGES
kronolith/lib/Driver/Sql.php

index ae9875d..d15391a 100644 (file)
@@ -2,6 +2,8 @@
 v3.0-git
 --------
 
+[mjr] Deleting a recurring event now also deletes any exceptions also.
+[mjr] Add support for inline maps to the Ajax interface.
 [jan] Add preference to limit the events per day in the month view.
 [jan] Add system calendars (Request #2059).
 [jan] Add URL field to events.
index 7f98651..3b2c341 100644 (file)
@@ -713,8 +713,8 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
         /* Fetch the event for later use. */
         $event = $this->getEvent($eventId);
 
-        $query = 'DELETE FROM ' . $this->_params['table'] . ' WHERE event_id = ? AND calendar_id = ?';
-        $values = array($eventId, $this->calendar);
+        $query = 'DELETE FROM ' . $this->_params['table'] . ' WHERE (event_id = ? OR event_baseid = ?) AND calendar_id = ?';
+        $values = array($eventId, $event->uid, $this->calendar);
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('Kronolith_Driver_Sql::deleteEvent(): user = "%s"; query = "%s"; values = "%s"',