update delete cats

This commit is contained in:
ceb 2002-10-12 00:48:36 +00:00
parent a8b4146b4e
commit 1e7e23d21c
2 changed files with 40 additions and 24 deletions

View File

@ -427,19 +427,27 @@
if ($GLOBALS['HTTP_POST_VARS']['confirm']) if ($GLOBALS['HTTP_POST_VARS']['confirm'])
{ {
switch ($GLOBALS['HTTP_POST_VARS']['subs']) if ($GLOBALS['HTTP_POST_VARS']['subs'])
{ {
case 'move': switch ($GLOBALS['HTTP_POST_VARS']['subs'])
$this->bo->delete(array('cat_id' => $this->cat_id, 'modify_subs' => True)); {
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data)); case 'move':
break; $this->bo->delete(array('cat_id' => $this->cat_id, 'modify_subs' => True));
case 'drop': Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
$this->bo->delete(array('cat_id' => $this->cat_id, 'drop_subs' => True)); break;
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data)); case 'drop':
break; $this->bo->delete(array('cat_id' => $this->cat_id, 'drop_subs' => True));
default: Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
$error_msg = lang('Please choose one of the methods to handle the subcategories'); break;
break; default:
$error_msg = lang('Please choose one of the methods to handle the subcategories');
break;
}
}
else
{
$this->bo->delete(array('cat_id' => $this->cat_id));
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
} }
} }

View File

@ -531,19 +531,27 @@
if (get_var('confirm',array('POST'))) if (get_var('confirm',array('POST')))
{ {
switch (get_var('subs',array('POST'))) if (get_var('subs',array('POST')))
{ {
case 'move': switch (get_var('subs',array('POST')))
$this->bo->delete(array('cat_id' => $this->cat_id,'modify_subs' => True)); {
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data)); case 'move':
break; $this->bo->delete(array('cat_id' => $this->cat_id,'modify_subs' => True));
case 'drop': Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
$this->bo->delete(array('cat_id' => $this->cat_id,'drop_subs' => True)); break;
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data)); case 'drop':
break; $this->bo->delete(array('cat_id' => $this->cat_id,'drop_subs' => True));
default: Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
$error_msg = lang('Please choose one of the methods to handle the subcategories'); break;
break; default:
$error_msg = lang('Please choose one of the methods to handle the subcategories');
break;
}
}
else
{
$this->bo->delete(array('cat_id' => $this->cat_id));
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
} }
} }