mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
killed a warning, if cat contains no resources
This commit is contained in:
parent
fe866fedae
commit
fef3601280
@ -478,9 +478,14 @@ class ui_resources
|
||||
// so it is possible to select all resources of a category
|
||||
foreach($cats as $cat_id => $cat_name)
|
||||
{
|
||||
$resources = $this->bo->so->search(array('cat_id' => $cat_id),'res_id');
|
||||
foreach($resources as $res) $key .= ($key == "")?'r'.$res['res_id']:',r'.$res['res_id'];
|
||||
$selectbox_content[$key] = $cat_name;
|
||||
if (($resources = $this->bo->so->search(array('cat_id' => $cat_id),'res_id')))
|
||||
{
|
||||
foreach($resources as $res)
|
||||
{
|
||||
$key .= ($key == "")?'r'.$res['res_id']:',r'.$res['res_id'];
|
||||
}
|
||||
$selectbox_content[$key] = $cat_name;
|
||||
}
|
||||
}
|
||||
$selectbox = $this->html->select(
|
||||
'owner',
|
||||
|
Loading…
Reference in New Issue
Block a user