only users can be owners, no need to add groups

This commit is contained in:
Ralf Becker 2012-09-18 11:40:08 +00:00
parent 1eca8a8fa8
commit 65bf21742a

View File

@ -493,7 +493,10 @@ class calendar_so
if ($type == 'u' && $filter == 'owner') if ($type == 'u' && $filter == 'owner')
{ {
$cal_table_def = $this->db->get_table_definitions('calendar',$this->cal_table); $cal_table_def = $this->db->get_table_definitions('calendar',$this->cal_table);
$owner_or = $this->db->expression($cal_table_def,array('cal_owner' => $ids)); // only users can be owners, no need to add groups
$user_ids = array();
foreach($ids as $user_id) if ($GLOBALS['egw']->accounts->get_type($user_id) === 'u') $user_ids[] = $user_id;
$owner_or = $this->db->expression($cal_table_def,array('cal_owner' => $user_ids));
} }
} }
else else