From: Jan Schneider Date: Mon, 30 Mar 2009 16:52:59 +0000 (+0200) Subject: Save recurrence exceptions when copying events (Bug #7689). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=068a3f6ef22539bea51b03bbb444df5f0e155120;p=horde.git Save recurrence exceptions when copying events (Bug #7689). --- 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): ?> + +