From d2eaa3f2b327d743f0a078f82bf96296dc1e1310 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 11 Jul 2004 22:33:34 +0000 Subject: [PATCH] fixed loosing participants-status on edit after new account-selection --- calendar/inc/class.bocalendar.inc.php | 9 +++++---- calendar/inc/class.uicalendar.inc.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.bocalendar.inc.php b/calendar/inc/class.bocalendar.inc.php index 6c53bd0a22..e0c8c3b6b1 100755 --- a/calendar/inc/class.bocalendar.inc.php +++ b/calendar/inc/class.bocalendar.inc.php @@ -839,6 +839,8 @@ ExecMethod('calendar.uicalendar.index'); $GLOBALS['phpgw']->common->phpgw_exit(); } + // reading the old event-state, to preserver the participant status + $old_event = $l_cal['id'] ? $this->so->read_entry((int) $l_cal['id']) : False; print_debug('Prior to fix_update_time()'); $this->fix_update_time($l_start); @@ -928,10 +930,9 @@ $part = Array(); for($i=0;$i 0) - { - $accept_type = 'U'; - } + // fetching the accept-type from the old version of the event + $accept_type = $old_event && isset($old_event['participants'][$parts[$i]]) ? $old_event['participants'][$parts[$i]] : 'U'; + $acct_type = $GLOBALS['phpgw']->accounts->get_type((int)$parts[$i]); if($acct_type == 'u') { diff --git a/calendar/inc/class.uicalendar.inc.php b/calendar/inc/class.uicalendar.inc.php index 0735e55f78..19f5920151 100755 --- a/calendar/inc/class.uicalendar.inc.php +++ b/calendar/inc/class.uicalendar.inc.php @@ -1283,7 +1283,7 @@ $participants = explode(";", $GLOBALS['phpgw']->session->appsession("participants") ); for($_f_part=0; $_f_partbo->add_attribute('participants','A',$participants[$_f_part]); + $this->bo->add_attribute('participants','U',$participants[$_f_part]); } // Add misc $this->bo->add_attribute('participants','A',$this->bo->owner);