diff --git a/admin/inc/class.bocategories.inc.php b/admin/inc/class.bocategories.inc.php index dbd414c29c..3d1f4f2527 100644 --- a/admin/inc/class.bocategories.inc.php +++ b/admin/inc/class.bocategories.inc.php @@ -147,14 +147,7 @@ { if (is_array($data)) { - $cat_id = $data['cat_id']; - $drop_subs = (isset($data['drop_subs'])?$data['drop_subs']:False); - $modify_subs = (isset($data['modify_subs'])?$data['modify_subs']:False); - - if ($cat_id > 0) - { - $this->cats->delete($cat_id,$drop_subs,$modify_subs); - } + $this->cats->delete($data); } } diff --git a/preferences/inc/class.bocategories.inc.php b/preferences/inc/class.bocategories.inc.php index 8599c9f673..044d5da8c1 100644 --- a/preferences/inc/class.bocategories.inc.php +++ b/preferences/inc/class.bocategories.inc.php @@ -104,9 +104,12 @@ return $this->cats->formated_list($format,$type,$cat_parent,$global_cats); } - function delete($cat_id,$drop_subs,$modify_subs) + function delete($data) { - $this->cats->delete($cat_id,$drop_subs,$modify_subs); + if (is_array($data)) + { + $this->cats->delete($data); + } } function check_values($values) diff --git a/preferences/inc/class.uicategories.inc.php b/preferences/inc/class.uicategories.inc.php index 3526cfa722..1445485af0 100644 --- a/preferences/inc/class.uicategories.inc.php +++ b/preferences/inc/class.uicategories.inc.php @@ -530,11 +530,11 @@ switch (get_var('subs',array('POST'))) { case 'move': - $this->bo->delete($this->cat_id,False,True); + $this->bo->delete(array('cat_id' => $this->cat_id,'modify_subs' => True)); Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data)); break; case 'drop': - $this->bo->delete($this->cat_id,True); + $this->bo->delete(array('cat_id' => $this->cat_id,'drop_subs' => True)); Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data)); break; default: