From 9c73eeca626f13e09de36e62c8fb574955b61e41 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 25 Jun 2015 20:32:03 +0000 Subject: [PATCH] do not track participants, if none set --- calendar/inc/class.calendar_tracking.inc.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_tracking.inc.php b/calendar/inc/class.calendar_tracking.inc.php index 25df1df0c8..4de483571f 100644 --- a/calendar/inc/class.calendar_tracking.inc.php +++ b/calendar/inc/class.calendar_tracking.inc.php @@ -132,13 +132,13 @@ class calendar_tracking extends bo_tracking * If this is one of a recurring event, append the recur_date to the participant field so we can * filter by it later. */ - $recur_prefix = $data['recur_date'] ? $data['recur_date'] : ''; if(is_array($data['participants'])) { $participants = $data['participants']; $data['participants'] = array(); foreach($participants as $uid => $status) { + $quantity = $role = $user_type = $user_id = null; calendar_so::split_status($status, $quantity, $role); calendar_so::split_user($uid, $user_type, $user_id); $field = is_numeric($uid) ? 'participants' : 'participants-'.$user_type; @@ -151,6 +151,12 @@ class calendar_tracking extends bo_tracking ); } } + // if clients eg. CalDAV do NOT set participants, they are left untouched + // therefore we should not track them, as all updates then show up as all participants removed + elseif(!isset($data['participants'])) + { + unset($old['participants']); + } if(is_array($old['participants'])) { $participants = $old['participants']; @@ -177,6 +183,7 @@ class calendar_tracking extends bo_tracking */ public function do_notifications($data,$old,$deleted=null) { + unset($data, $old, $deleted); // unused, but required by function signature return true; } }