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

@ -426,6 +426,8 @@
} }
if ($GLOBALS['HTTP_POST_VARS']['confirm']) if ($GLOBALS['HTTP_POST_VARS']['confirm'])
{
if ($GLOBALS['HTTP_POST_VARS']['subs'])
{ {
switch ($GLOBALS['HTTP_POST_VARS']['subs']) switch ($GLOBALS['HTTP_POST_VARS']['subs'])
{ {
@ -442,6 +444,12 @@
break; break;
} }
} }
else
{
$this->bo->delete(array('cat_id' => $this->cat_id));
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
}
}
$GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete_cat.tpl')); $GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete_cat.tpl'));

View File

@ -530,6 +530,8 @@
$this->bo->cats->app_name = $cats_app; $this->bo->cats->app_name = $cats_app;
if (get_var('confirm',array('POST'))) if (get_var('confirm',array('POST')))
{
if (get_var('subs',array('POST')))
{ {
switch (get_var('subs',array('POST'))) switch (get_var('subs',array('POST')))
{ {
@ -546,6 +548,12 @@
break; break;
} }
} }
else
{
$this->bo->delete(array('cat_id' => $this->cat_id));
Header('Location: ' . $GLOBALS['phpgw']->link('/index.php',$link_data));
}
}
$GLOBALS['phpgw']->common->phpgw_header(); $GLOBALS['phpgw']->common->phpgw_header();
$GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete.tpl')); $GLOBALS['phpgw']->template->set_file(array('category_delete' => 'delete.tpl'));