update function add/edit

This commit is contained in:
bettina 2001-04-27 22:50:02 +00:00
parent 49f29fb0f5
commit 3593fadc84

View File

@ -270,7 +270,12 @@
if ($cat_main)
{
$this->db2->query("Select cat_level from phpgw_categories where cat_id='$cat_parent'",__LINE__,__FILE__);
if (!$cat_parent)
{
$cat_parent = $cat_main;
}
$this->db2->query("select cat_level from phpgw_categories where cat_id='$cat_parent'",__LINE__,__FILE__);
$this->db2->next_record();
$cat_level = $this->db2->f('cat_level')+1;
@ -322,7 +327,12 @@
if ($cat_main)
{
$this->db2->query("Select cat_level from phpgw_categories where cat_id='$cat_parent'",__LINE__,__FILE__);
if (!$cat_parent)
{
$cat_parent = $cat_main;
}
$this->db2->query("select cat_level from phpgw_categories where cat_id='$cat_parent'",__LINE__,__FILE__);
$this->db2->next_record();
$cat_level = $this->db2->f('cat_level')+1;