From 068a3f6ef22539bea51b03bbb444df5f0e155120 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 30 Mar 2009 18:52:59 +0200 Subject: [PATCH] Save recurrence exceptions when copying events (Bug #7689). --- kronolith/docs/CHANGES | 1 + kronolith/lib/Event.php | 8 ++++++++ kronolith/templates/edit/edit.inc | 6 ++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/kronolith/docs/CHANGES b/kronolith/docs/CHANGES index 88b677dd3..d4773a83f 100644 --- a/kronolith/docs/CHANGES +++ b/kronolith/docs/CHANGES @@ -17,6 +17,7 @@ v3.0-git v2.3.1-cvs ---------- +[jan] Save recurrence exceptions when copying events (Bug #7689). [jan] Prevent warnings if trying to add address lists as attendees (Bug #7834). [jan] Fix start and end time calculation of multi-day events (Bug #7788). [jan] Wrap URL in calendar information in IE7 (almarin@um.es, Bug #8043). diff --git a/kronolith/lib/Event.php b/kronolith/lib/Event.php index c323190d5..13cf16a02 100644 --- a/kronolith/lib/Event.php +++ b/kronolith/lib/Event.php @@ -1788,6 +1788,14 @@ abstract class Kronolith_Event $this->recurrence->setRecurInterval(Util::getFormData('recur_yearly_weekday_interval', 1)); break; } + + if ($exceptions = Util::getFormData('exceptions')) { + foreach ($exceptions as $exception) { + $this->recurrence->addException((int)substr($exception, 0, 4), + (int)substr($exception, 4, 2), + (int)substr($exception, 6, 2)); + } + } } // Tags. diff --git a/kronolith/templates/edit/edit.inc b/kronolith/templates/edit/edit.inc index 80132e5c5..ad08ca89e 100644 --- a/kronolith/templates/edit/edit.inc +++ b/kronolith/templates/edit/edit.inc @@ -350,14 +350,16 @@ endif; -recurs() && $event->recurrence->getExceptions()): ?> +recurs() && ($exceptions = $event->recurrence->getExceptions())): ?> - exceptionsList(); ?> + exceptionsList(); foreach($exceptions as $exception): ?> + + -- 2.11.0