fix for bug #843270: unkillable categories

sub-cats should either be delete or made mains if there parent get deleted
This commit is contained in:
Ralf Becker 2004-02-26 12:18:44 +00:00
parent f11dd0e255
commit b074cbf924
3 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@
function delete($cat_id,$subs=False)
{
return $this->cats->delete($cat_id,$subs);
return $this->cats->delete($cat_id,$subs,!$subs); // either delete the subs or modify them
}
function check_values($values)

View File

@ -106,9 +106,9 @@
return $this->cats->formated_list($format,$type,$cat_parent,$global_cats);
}
function delete($cat_id,$drop_subs,$modify_subs=false)
function delete($cat_id,$subs)
{
return $this->cats->delete($cat_id,$drop_subs,$modify_subs);
return $this->cats->delete($cat_id,$subs,!$subs); // either delete the subs or modify them
}
function check_values($values)

View File

@ -551,7 +551,7 @@
}
else
{
$this->bo->delete($cat_id,False,True);
$this->bo->delete($cat_id);
}
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
}