mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
update delete cats
This commit is contained in:
parent
b6e2ef8143
commit
557c3842f2
@ -143,9 +143,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
function delete($cat_id,$drop_subs,$modify_subs)
|
||||
function delete($data)
|
||||
{
|
||||
$this->cats->delete($cat_id,$drop_subs,$modify_subs);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function check_values($values)
|
||||
|
@ -430,16 +430,15 @@
|
||||
switch ($GLOBALS['HTTP_POST_VARS']['subs'])
|
||||
{
|
||||
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:
|
||||
$error_msg = lang('Please choose one of the methods to handle the subcategories');
|
||||
//$this->bo->delete($this->cat_id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user