From e6f350ebd53a80bddd2e31352dca86f6c32a31f4 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 19 Apr 2010 17:45:51 -0400 Subject: [PATCH] Delete the events that represent exceptions to a recurring event when deleting the recurring event. Also get caught up on CHANGES --- kronolith/docs/CHANGES | 2 ++ kronolith/lib/Driver/Sql.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kronolith/docs/CHANGES b/kronolith/docs/CHANGES index ae9875ddb..d15391a60 100644 --- a/kronolith/docs/CHANGES +++ b/kronolith/docs/CHANGES @@ -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. diff --git a/kronolith/lib/Driver/Sql.php b/kronolith/lib/Driver/Sql.php index 7f98651a7..3b2c34189 100644 --- a/kronolith/lib/Driver/Sql.php +++ b/kronolith/lib/Driver/Sql.php @@ -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"', -- 2.11.0