From f6bba15754d8231a127e98eb160b3611aec42e1c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 23 Jul 2014 13:16:24 +0000 Subject: [PATCH] skip current user only for users, not group(-preferences) --- calendar/inc/class.calendar_activesync.inc.php | 6 ++---- calendar/inc/class.calendar_groupdav.inc.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_activesync.inc.php b/calendar/inc/class.calendar_activesync.inc.php index 28d7b2b43e..4cb3520dc7 100644 --- a/calendar/inc/class.calendar_activesync.inc.php +++ b/calendar/inc/class.calendar_activesync.inc.php @@ -1581,11 +1581,9 @@ END:VTIMEZONE foreach (calendar_bo::list_calendars($hook_data['account_id']) as $entry) { $account_id = $entry['grantor']; - if ($account_id != $hook_data['account_id']) // skip current user - { - $cals[$account_id] = $entry['name']; - } + $cals[$account_id] = $entry['name']; } + if ($hook_data['account_id'] > 0) unset($cals[$hook_data['account_id']]); // skip current user } $cals['G'] = lang('Primary group'); $cals['A'] = lang('All'); diff --git a/calendar/inc/class.calendar_groupdav.inc.php b/calendar/inc/class.calendar_groupdav.inc.php index 0d6089eb16..a3273242c0 100644 --- a/calendar/inc/class.calendar_groupdav.inc.php +++ b/calendar/inc/class.calendar_groupdav.inc.php @@ -1547,7 +1547,7 @@ class calendar_groupdav extends groupdav_handler { $calendars[$entry['grantor']] = $entry['name']; } - unset($calendars[$user]); + if ($user > 0) unset($calendars[$user]); // skip current user } $settings = array();