From f081a1ba2b8e7ea9afd9b2d7ef1c6833355a517d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 30 Apr 2010 16:00:03 +0000 Subject: [PATCH] Reset status of participants when copying an event --- calendar/inc/class.calendar_uiforms.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 721d2005c6..156ac489f8 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -428,6 +428,16 @@ class calendar_uiforms extends calendar_ui unset($event['modified']); unset($event['modifier']); $event['owner'] = !(int)$this->owner || !$this->bo->check_perms(EGW_ACL_ADD,0,$this->owner) ? $this->user : $this->owner; + + // Clear participant stati + foreach($event['participant_types'] as $type => &$participants) { + foreach($participants as $id => &$response) + { + if($type == 'u' && $id == $event['owner']) continue; + calendar_so::split_status($status, $quantity, $role); + $response = calendar_so::combine_status('U',$quantity,$role); + } + } $preserv['view'] = $preserv['edit_single'] = false; $msg = lang('Event copied - the copy can now be edited'); $event['title'] = lang('Copy of:').' '.$event['title'];