fixed loosing participants-status on edit after new account-selection

This commit is contained in:
Ralf Becker 2004-07-11 22:33:34 +00:00
parent c5291e6fab
commit d2eaa3f2b3
2 changed files with 6 additions and 5 deletions

View File

@ -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<count($parts);$i++)
{
if (($accept_type = substr($parts[$i],-1,1)) == '0' || (int)$accept_type > 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')
{

View File

@ -1283,7 +1283,7 @@
$participants = explode(";", $GLOBALS['phpgw']->session->appsession("participants") );
for($_f_part=0; $_f_part<count($participants); $_f_part++)
{
$this->bo->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);