fixed problem with SyncML update of recuring events

This commit is contained in:
Ralf Becker 2006-03-09 21:40:35 +00:00
parent 33294344ae
commit ff8612fbca
2 changed files with 10 additions and 2 deletions

View File

@ -493,6 +493,12 @@ class bocal
{ {
$this->debug_message('bocal::set_recurrences(%1,%2)',true,$event,$start); $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']; if (!$start) $start = $event['start'];
$events = array(); $events = array();

View File

@ -243,6 +243,8 @@ class bocalupdate extends bocal
if (!($new_event = !(int)$event['id'])) if (!($new_event = !(int)$event['id']))
{ {
$old_event = $this->read((int)$event['id'],null,$ignore_acl); $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 "old $event[id]="; _debug_array($old_event);
} }
//echo "saving $event[id]="; _debug_array($event); //echo "saving $event[id]="; _debug_array($event);
@ -661,8 +663,8 @@ class bocalupdate extends bocal
function save($event) function save($event)
{ {
// check if user has the permission to update / create the 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']) || if ($event['id'] && !$this->check_perms(EGW_ACL_EDIT,$event['id']) ||
!$event['cal_id'] && !$this->check_perms(EGW_ACL_EDIT,0,$event['owner'])) !$event['id'] && !$this->check_perms(EGW_ACL_EDIT,0,$event['owner']))
{ {
return false; return false;
} }