diff --git a/resources/inc/class.so_resources.inc.php b/resources/inc/class.so_resources.inc.php index 3c7190bca3..9c1e840409 100755 --- a/resources/inc/class.so_resources.inc.php +++ b/resources/inc/class.so_resources.inc.php @@ -47,7 +47,7 @@ class so_resources { $wherecats .= ($wherecats ? " OR " : " AND ( " ) .'cat_id' . "='".$cat_id."'"; } - $wherecats .= " ) "; + $wherecats .= $wherecats ? " ) " : ""; $this->db->query( 'SELECT '.$select." FROM ".$this->rs_table." WHERE ".$where.$wherecats. ($order_by != '' ? " ORDER BY $order_by" : ''),__LINE__,__FILE__); diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index 81696578a5..c2a38672e9 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -70,8 +70,7 @@ class ui_resources $content['nm']['no_filter'] = False; $content['nm']['filter_label'] = lang('Category'); $content['nm']['filter_help'] = lang('Select a category'); // is this used??? - $content['nm']['options-filter']= array('0' => lang('all categories')); - $content['nm']['options-filter']+= $this->bo->acl->get_cats(PHPGW_ACL_READ); + $content['nm']['options-filter']= array('0'=>lang('all categories'))+(array)$this->bo->acl->get_cats(PHPGW_ACL_READ); $content['nm']['no_filter2'] = True; $content['nm']['no_cat'] = True;