fix for bug [ 1446044 ] eGw asking for delete sub-categories when it not exists

This commit is contained in:
Ralf Becker 2006-03-10 09:53:10 +00:00
parent cfc4ad5006
commit db1a32aa33
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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__);