diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 4ca0d0648d..79ca26f321 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -479,7 +479,7 @@ class ui_resources * get data für calendar sidebox * * @author Lukas Weiss - * @param array $param with keys menuaction, owner and optional date + * @param array $param with keys menuaction, owner and optional date and return_array * @return array with: label=>link or array with text */ function get_calendar_sidebox($param) @@ -487,6 +487,12 @@ class ui_resources $cats = $this->bo->acl->get_cats(EGW_ACL_READ); if (!$cats) return array(); + if(array_key_exists('return_array', $param)) + { + $return_array = $param['return_array']; + unset($param['return_array']); + } + $owners = explode(',',$param['owner']); unset($param['owner']); $res_cats = $selected = array(); @@ -529,22 +535,29 @@ class ui_resources $resources['r'.$data['res_id']] = $data['name']; } } - $selectbox = html::select( - 'owner', - $selected, - array_merge($resources,$res_cats), - $no_lang=true, - $options='style="width: 100%;" onchange="load_cal(\''. - egw::link('/index.php',$param,false).'\',\'uical_select_resource\');" id="uical_select_resource"', - $multiple=count($selected) ? 4 : 0 - ); - return array( - array( - 'text' => $selectbox, - 'no_lang' => True, - 'link' => False - ) - ); + if(!isset($return_array)) + { + $selectbox = html::select( + 'owner', + $selected, + array_merge($resources,$res_cats), + $no_lang=true, + $options='style="width: 100%;" onchange="load_cal(\''. + egw::link('/index.php',$param,false).'\',\'uical_select_resource\');" id="uical_select_resource"', + $multiple=count($selected) ? 4 : 0 + ); + return array( + array( + 'text' => $selectbox, + 'no_lang' => True, + 'link' => False + ) + ); + } + else + { + return array_merge($resources,$res_cats); + } } }