From 559a86ac0c8c91ed50f1fa30617f7bfdd6f3fb48 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 4 Nov 2019 10:51:39 -0700 Subject: [PATCH] Calendar: Rework some phrasing in the preference, make sure it only applies to "responses", not other changes --- calendar/inc/class.calendar_boupdate.inc.php | 11 ++++++----- calendar/inc/class.calendar_hooks.inc.php | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index b9a96b2797..67062c2897 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -605,6 +605,12 @@ class calendar_boupdate extends calendar_bo // $msg_is_response = $msg_type == MSG_REJECTED || $msg_type == MSG_ACCEPTED || $msg_type == MSG_TENTATIVE || $msg_type == MSG_DELEGATED; + // Check if user is not participating, and does not want notifications + if($msg_is_response && !$part_prefs['calendar']['receive_not_participating'] && !array_key_exists($userid, $old_event['participants'])) + { + return false; + } + // always notify externals chairs // EGroupware owner only get notified about responses, if pref is NOT "no" if (!is_numeric($userid) && $role == 'CHAIR' && @@ -629,11 +635,6 @@ class calendar_boupdate extends calendar_bo } else { - // Check if user is not participating, and does not want notifications - if(!$part_prefs['calendar']['receive_not_participating'] && !array_key_exists($userid, $old_event['participants'])) - { - return false; - } switch($ru = $part_prefs['calendar']['receive_updates']) { case 'responses': diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index c0d5c8b8d0..f19e9d4c63 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -528,10 +528,10 @@ class calendar_hooks ), 'receive_not_participating' => array( 'type' => 'select', - 'label' => 'Receive notifications about events you are not a participant in', + 'label' => 'Do you want responses from events you are not participating in?', 'name' => 'receive_not_participating', 'values' => $yesno, - 'help' => 'Do you want to be notified about events you created, but are not participating in?', + 'help' => 'Do you want to be notified about participant responses from events you created, but are not participating in?', 'default'=> '1' ), 'notify_externals' => array(