diff --git a/admin/inc/class.bocategories.inc.php b/admin/inc/class.bocategories.inc.php index b91583eba7..2c20ec08ed 100644 --- a/admin/inc/class.bocategories.inc.php +++ b/admin/inc/class.bocategories.inc.php @@ -135,11 +135,11 @@ { if ($data['global_cats']) { - return $this->cats->formated_list($data['select'],$data['all'],$data['cat_parent'],True); + return $this->cats->formated_list($data['select'],$data['all'],$data['parent'],True); } else { - return $this->cats->formated_list($data['select'],$data['all'],$data['cat_parent']); + return $this->cats->formated_list($data['select'],$data['all'],$data['parent']); } } diff --git a/admin/inc/class.uicategories.inc.php b/admin/inc/class.uicategories.inc.php index 356e680a2d..9d63520471 100644 --- a/admin/inc/class.uicategories.inc.php +++ b/admin/inc/class.uicategories.inc.php @@ -341,6 +341,8 @@ $values['access'] = 'public'; } + //_debug_array($values); + $error = $this->bo->check_values($values); if (is_array($error)) { @@ -377,7 +379,7 @@ $GLOBALS['phpgw']->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cats['descr'])); $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->formatted_list(array('select' => 'select', 'all' => 'all', - 'cat_parent' => $cats['parent'], + 'parent' => $cats['parent'], 'global_cats' => $global_cats))); $GLOBALS['phpgw']->template->parse('buttons','edit'); $GLOBALS['phpgw']->template->fp('phpgw_body','form'); diff --git a/admin/templates/default/category_form.tpl b/admin/templates/default/category_form.tpl index a5502aea6f..4addab177f 100644 --- a/admin/templates/default/category_form.tpl +++ b/admin/templates/default/category_form.tpl @@ -52,7 +52,7 @@ ' . "\n"; $s .= '' . "\n"; - $s .= '' . "\n" . '' . "\n"; @@ -487,7 +487,7 @@ while (is_array($cats) && list(,$cat) = each($cats)) { $sel_cat = ''; - if (in_array($cat['id'],$selected)) + if (in_array($cat['cat_id'],$selected)) { $sel_cat = 'selected'; } @@ -510,7 +510,7 @@ $cat_list[] = array ( - 'id' => $cat['id'], + 'cat_id' => $cat['cat_id'], 'name' => $name, 'selected' => $sel_cat ); @@ -546,7 +546,7 @@ $values['descr'] = $this->db->db_addslashes($values['descr']); $values['name'] = $this->db->db_addslashes($values['name']); - if (isset($values['id'])) + if (isset($values['cat_id'])) { $id_col = 'cat_id,'; $id_val = $values['cat_id'].',';
- +
diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 22fa028657..38648a38d5 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -395,8 +395,8 @@ { for ($i=0;$icommon->image('phpgwapi','roter_pfeil') . '">'; } - if (($cats[$i]['level'] == 0) && !in_array($cats[$i]['id'],$selected)) + if (($cats[$i]['level'] == 0) && !in_array($cats[$i]['cat_id'],$selected)) { $image_set = ''; } @@ -446,7 +446,7 @@ $s .= '
' . $image_set . '' . $space_set . '' + $s .= '' . $space_set . '' . $GLOBALS['phpgw']->strip_html($cats[$i]['name']) . '