From f8ae428f32dcc3f7e7af712a91e9f291e74d973f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 17 Jul 2012 12:36:48 +0000 Subject: [PATCH] * Calendar: fixed EGroupware owner got notified about status changes, even if email-notification preference was "never", now only external chairs get always notified --- calendar/inc/class.calendar_boupdate.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 5260aba9f2..5bb88f264e 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -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);