From db6c6cd462966f99bff759ff036c0d783cc0450e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 15 Apr 2010 14:10:01 +0000 Subject: [PATCH] "show only groups with calendar rights, as we do in the calendar selection" --- calendar/inc/class.calendar_hooks.inc.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 8e6f57c428..d972580260 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -237,14 +237,10 @@ class calendar_hooks ); if (!$hook_data['setup']) // does not work at setup time { - $groups = $GLOBALS['egw']->accounts->membership($GLOBALS['egw_info']['user']['account_id']); $options = array('0' => lang('none')); - if (is_array($groups)) + foreach($GLOBALS['egw']->accounts->search(array('type' => 'owngroups','app' => 'calendar')) as $group) { - foreach($groups as $group) - { - $options[$group['account_id']] = $GLOBALS['egw']->common->grab_owner_name($group['account_id']); - } + $options[$group['account_id']] = common::grab_owner_name($group['account_id']); } $freebusy_url = calendar_bo::freebusy_url($GLOBALS['egw_info']['user']['account_lid'],$GLOBALS['egw_info']['user']['preferences']['calendar']['freebusy_pw']); $freebusy_help = lang('Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1.',''.$freebusy_url.'');