From fef360128037fa04b06f1e99c32ed427aa4172d9 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 30 Sep 2005 03:51:59 +0000 Subject: [PATCH] killed a warning, if cat contains no resources --- resources/inc/class.ui_resources.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 7fa9979f50..897c290abf 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -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',