From 5c29be0ed1bdf7360809fa9021ebb67a00b7b7a4 Mon Sep 17 00:00:00 2001 From: Christian Binder Date: Fri, 15 Jan 2010 08:44:21 +0000 Subject: [PATCH] read event start and end times if not given from the caller to avoid broken recurrences --- calendar/inc/class.calendar_bo.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index 0afb5359af..9fd11d76c9 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -599,11 +599,18 @@ class calendar_bo */ function set_recurrences($event,$start=0) { - if ($this->debug && ((int) $this->debug >= 2 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont')) + if ($this->debug && ((int) $this->debug >= 2 || $this->debug == 'set_recurrences' || $this->debug == 'check_move_horizont')) { $this->debug_message('bocal::set_recurrences(%1,%2)',true,$event,$start); } - // check if the caller gave the participants and if not read them from the DB + // check if the caller gave the event start and end times and if not read them from the DB + if (!isset($event['start']) || !isset($event['end'])) + { + $event_read=$this->read($event['id']); + $event['start'] = $event_read['start']; + $event['end'] = $event_read['end']; + } + // check if the caller gave the participants and if not read them from the DB if (!isset($event['participants'])) { list(,$event_read) = each($this->so->read($event['id']));