mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 18:31:37 +02:00
This now sends email notifications for all changes of status. You cannot reset your status to 'No Response' once it has been either accepted/tentative/rejected.
This commit is contained in:
parent
0c01a48016
commit
05fec0da11
@ -130,6 +130,16 @@ class calendar__
|
|||||||
$event_id = $old_event->id;
|
$event_id = $old_event->id;
|
||||||
$msgtype = '"calendar";';
|
$msgtype = '"calendar";';
|
||||||
break;
|
break;
|
||||||
|
case MSG_TENTATIVE:
|
||||||
|
$action = 'Tentative';
|
||||||
|
$event_id = $old_event->id;
|
||||||
|
$msgtype = '"calendar";';
|
||||||
|
break;
|
||||||
|
case MSG_ACCEPTED:
|
||||||
|
$action = 'Tentative';
|
||||||
|
$event_id = $old_event->id;
|
||||||
|
$msgtype = '"calendar";';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($old_event != False)
|
if($old_event != False)
|
||||||
@ -159,6 +169,8 @@ class calendar__
|
|||||||
$phpgw_info['user']['preferences']['common']['timeformat'] = $part_prefs['common']['timeformat'];
|
$phpgw_info['user']['preferences']['common']['timeformat'] = $part_prefs['common']['timeformat'];
|
||||||
$phpgw_info['user']['preferences']['common']['dateformat'] = $part_prefs['common']['dateformat'];
|
$phpgw_info['user']['preferences']['common']['dateformat'] = $part_prefs['common']['dateformat'];
|
||||||
|
|
||||||
|
$new_tz_offset = ((60 * 60) * intval($phpgw_info['user']['preferences']['common']['tz_offset']));
|
||||||
|
|
||||||
if($old_event != False)
|
if($old_event != False)
|
||||||
{
|
{
|
||||||
$old_event_date = $phpgw->common->show_date($old_event_datetime);
|
$old_event_date = $phpgw->common->show_date($old_event_datetime);
|
||||||
@ -184,8 +196,10 @@ class calendar__
|
|||||||
$body = 'You have a meeting scheduled for '.$new_event_date;
|
$body = 'You have a meeting scheduled for '.$new_event_date;
|
||||||
break;
|
break;
|
||||||
case MSG_REJECTED:
|
case MSG_REJECTED:
|
||||||
|
case MSG_TENTATIVE:
|
||||||
|
case MSG_ACCEPTED:
|
||||||
$action_date = $old_event_date;
|
$action_date = $old_event_date;
|
||||||
$body = 'On '.$phpgw->common->show_date(time() - ((60 * 60) * intval($phpgw_info['user']['preferences']['common']['tz_offset']))).' '.$phpgw->common->grab_owner_name($phpgw_info['user']['account_id']).' REJECTED your meeting request for '.$old_event_date;
|
$body = 'On '.$phpgw->common->show_date(time() - $new_tz_offset).' '.$phpgw->common->grab_owner_name($phpgw_info['user']['account_id']).' '.$action.' your meeting request for '.$old_event_date;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$subject = 'Calendar Event ('.$action.') #'.$event_id.': '.$action_date.' (L)';
|
$subject = 'Calendar Event ('.$action.') #'.$event_id.': '.$action_date.' (L)';
|
||||||
|
@ -728,18 +728,24 @@ class calendar_ extends calendar__
|
|||||||
TENTATIVE => 'T',
|
TENTATIVE => 'T',
|
||||||
ACCEPTED => 'A'
|
ACCEPTED => 'A'
|
||||||
);
|
);
|
||||||
if($status == REJECTED)
|
|
||||||
{
|
|
||||||
$temp_event = $this->event;
|
$temp_event = $this->event;
|
||||||
$old_event = $this->fetch_event($this->stream,$id);
|
$old_event = $this->fetch_event($this->stream,$id);
|
||||||
|
switch($status)
|
||||||
|
{
|
||||||
|
case REJECTED:
|
||||||
$this->send_update(MSG_REJECTED,$old_event->participants,$old_event);
|
$this->send_update(MSG_REJECTED,$old_event->participants,$old_event);
|
||||||
$this->stream->query("DELETE FROM phpgw_cal_user WHERE cal_id=".$id." AND cal_login=".$owner,__LINE__,__FILE__);
|
$this->stream->query("DELETE FROM phpgw_cal_user WHERE cal_id=".$id." AND cal_login=".$owner,__LINE__,__FILE__);
|
||||||
$this->event = $temp_event;
|
break;
|
||||||
}
|
case TENTATIVE:
|
||||||
else
|
$this->send_update(MSG_TENTATIVE,$old_event->participants,$old_event);
|
||||||
{
|
|
||||||
$this->stream->query("UPDATE phpgw_cal_user SET cal_status='".$status_code_short[$status]."' WHERE cal_id=".$id." AND cal_login=".$owner,__LINE__,__FILE__);
|
$this->stream->query("UPDATE phpgw_cal_user SET cal_status='".$status_code_short[$status]."' WHERE cal_id=".$id." AND cal_login=".$owner,__LINE__,__FILE__);
|
||||||
|
break;
|
||||||
|
case ACCEPTED:
|
||||||
|
$this->send_update(MSG_ACCEPTED,$old_event->participants,$old_event);
|
||||||
|
$this->stream->query("UPDATE phpgw_cal_user SET cal_status='".$status_code_short[$status]."' WHERE cal_id=".$id." AND cal_login=".$owner,__LINE__,__FILE__);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
$this->event = $temp_event;
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user