From ff8612fbca18288a80ee7184ca0e6426f75c8b25 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 9 Mar 2006 21:40:35 +0000 Subject: [PATCH] fixed problem with SyncML update of recuring events --- calendar/inc/class.bocal.inc.php | 6 ++++++ calendar/inc/class.bocalupdate.inc.php | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.bocal.inc.php b/calendar/inc/class.bocal.inc.php index 55cac95207..d853257cd4 100644 --- a/calendar/inc/class.bocal.inc.php +++ b/calendar/inc/class.bocal.inc.php @@ -493,6 +493,12 @@ class bocal { $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 + if (!isset($event['participants'])) + { + list(,$event_read) = each($this->so->read($event['id'])); + $event['participants'] = $event_read['participants']; + } if (!$start) $start = $event['start']; $events = array(); diff --git a/calendar/inc/class.bocalupdate.inc.php b/calendar/inc/class.bocalupdate.inc.php index 3e484da7e9..893536d562 100644 --- a/calendar/inc/class.bocalupdate.inc.php +++ b/calendar/inc/class.bocalupdate.inc.php @@ -243,6 +243,8 @@ class bocalupdate extends bocal if (!($new_event = !(int)$event['id'])) { $old_event = $this->read((int)$event['id'],null,$ignore_acl); + // if no participants are set, set them from the old event, as we might need them to update recuring events + if (!isset($event['participants'])) $event['participants'] = $old_event['participants']; //echo "old $event[id]="; _debug_array($old_event); } //echo "saving $event[id]="; _debug_array($event); @@ -661,8 +663,8 @@ class bocalupdate extends bocal function save($event) { // check if user has the permission to update / create the event - if ($event['cal_id'] && !$this->check_perms(EGW_ACL_EDIT,$event['cal_id']) || - !$event['cal_id'] && !$this->check_perms(EGW_ACL_EDIT,0,$event['owner'])) + if ($event['id'] && !$this->check_perms(EGW_ACL_EDIT,$event['id']) || + !$event['id'] && !$this->check_perms(EGW_ACL_EDIT,0,$event['owner'])) { return false; }