mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
* Calendar: fixed EGroupware owner got notified about status changes, even if email-notification preference was "never", now only external chairs get always notified
This commit is contained in:
parent
ab1fdb0617
commit
f8ae428f32
@ -551,13 +551,15 @@ class calendar_boupdate extends calendar_bo
|
||||
}
|
||||
break;
|
||||
case 'no':
|
||||
if ($msg_is_response && $role == 'CHAIR') // always notify chairs!
|
||||
// always notify externals chairs
|
||||
// EGroupware owner only get notified about responses, if pref is NOT "no"
|
||||
if (!is_numeric($userid) && $msg_is_response && $role == 'CHAIR')
|
||||
{
|
||||
++$want_update;
|
||||
}
|
||||
break;
|
||||
}
|
||||
//error_log(__METHOD__."(userid=$userid,,msg_type=$msg_type,...) msg_is_response=$msg_is_response, want_update=$want_update");
|
||||
//error_log(__METHOD__."(userid=$userid, receive_updates='$ru', msg_type=$msg_type, ..., role='$role') msg_is_response=$msg_is_response --> want_update=$want_update");
|
||||
return $want_update > 0;
|
||||
}
|
||||
|
||||
@ -633,7 +635,7 @@ class calendar_boupdate extends calendar_bo
|
||||
$owner = $old_event ? $old_event['owner'] : $new_event['owner'];
|
||||
if ($owner && !isset($to_notify[$owner]) && $msg_type != MSG_ALARM)
|
||||
{
|
||||
$to_notify[$owner] = 'owner'; // always include the event-owner
|
||||
$to_notify[$owner] = 'OCHAIR'; // always include the event-owner
|
||||
}
|
||||
$version = $GLOBALS['egw_info']['apps']['calendar']['version'];
|
||||
|
||||
@ -897,6 +899,7 @@ class calendar_boupdate extends calendar_bo
|
||||
if($GLOBALS['egw_info']['apps']['notifications']['enabled'])
|
||||
{
|
||||
try {
|
||||
//error_log(__METHOD__."() notifying $userid from $senderid: $subject");
|
||||
$notification = new notifications();
|
||||
$notification->set_receivers(array($userid));
|
||||
$notification->set_message($body);
|
||||
|
Loading…
Reference in New Issue
Block a user