mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
something to maintain users status when editing existing events
This commit is contained in:
parent
629790873c
commit
82dc6f2b07
@ -150,7 +150,7 @@ class calendar__
|
||||
$phpgw_info['user']['preferences']['common']['dateformat'] = $temp_dateformat;
|
||||
}
|
||||
|
||||
function prepare_recipients($new_event,$old_event)
|
||||
function prepare_recipients(&$new_event,$old_event)
|
||||
{
|
||||
for($i=0;$i<count($old_event->participants);$i++)
|
||||
{
|
||||
@ -161,6 +161,7 @@ class calendar__
|
||||
{
|
||||
$delete = False;
|
||||
$this->modified[] = $new_event->participants[$k];
|
||||
$new_event->status[$k] = $old_event->status[$i];
|
||||
}
|
||||
}
|
||||
if($delete == True)
|
||||
@ -181,6 +182,7 @@ class calendar__
|
||||
if($add == True)
|
||||
{
|
||||
$this->added[] = $new_event->participants[$i];
|
||||
$new_event->status[$i] = 'U';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -849,13 +849,17 @@ class calendar_ extends calendar__
|
||||
|
||||
$this->stream->query('DELETE FROM calendar_entry_user WHERE cal_id='.$event->id,__LINE__,__FILE__);
|
||||
|
||||
reset($event->participants);
|
||||
while ($participant = each($event->participants))
|
||||
{
|
||||
$status = 'U';
|
||||
if(intval($participant[1]) == intval($this->user))
|
||||
{
|
||||
$status = 'A';
|
||||
}
|
||||
else
|
||||
{
|
||||
$status = $event->status[$participant[0]];
|
||||
}
|
||||
$this->stream->query('INSERT INTO calendar_entry_user(cal_id,cal_login,cal_status) '
|
||||
. 'VALUES('.$event->id.','.$participant[1].",'".$status."')",__LINE__,__FILE__);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user