diff --git a/admin/inc/class.bocategories.inc.php b/admin/inc/class.bocategories.inc.php index b328f53fd9..75c29bc11c 100644 --- a/admin/inc/class.bocategories.inc.php +++ b/admin/inc/class.bocategories.inc.php @@ -119,7 +119,7 @@ { $data['type'] = $data['type'] ? $data['type'] : ''; $data['cat_id'] = $data['cat_id'] ? $data['cat_id'] : ''; - return $this->cats->exists($data['type'],$data['cat_name'],$data['cat_id']); + return $this->cats->exists($data['type'],$data['cat_name'],$data['type'] == 'subs' ? 0 : $data['cat_id'],$data['type'] != 'subs' ? 0 : $data['cat_id']); } function formatted_list($data) diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 59d764bede..f3402c219d 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -677,7 +677,7 @@ { $where['cat_id'] = $cat_id; } - if ($parent) $where['cat_parent'] = $cat_parent; + if ($parent) $where['cat_parent'] = $parent; $this->db->select($this->table,'cat_id',$where,__LINE__,__FILE__);