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'])
{
switch ($GLOBALS['HTTP_POST_VARS']['subs'])
if ($GLOBALS['HTTP_POST_VARS']['subs'])
{
case 'move':
$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(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');
break;
switch ($GLOBALS['HTTP_POST_VARS']['subs'])
{
case 'move':
$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(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');
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')))
{
switch (get_var('subs',array('POST')))
if (get_var('subs',array('POST')))
{
case 'move':
$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(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');
break;
switch (get_var('subs',array('POST')))
{
case 'move':
$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(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');
break;
}
}
else
{
$this->bo->delete(array('cat_id' => $this->cat_id));
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
}
}