From 1f611ae1b31e2d3b4fa419830e6841600c7adc8e Mon Sep 17 00:00:00 2001 From: ceb Date: Sun, 13 Jan 2002 23:31:03 +0000 Subject: [PATCH] added data fields to cats setup --- preferences/inc/class.bocategories.inc.php | 4 ++-- preferences/inc/class.uicategories.inc.php | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/preferences/inc/class.bocategories.inc.php b/preferences/inc/class.bocategories.inc.php index 72df480b23..80be7375c5 100644 --- a/preferences/inc/class.bocategories.inc.php +++ b/preferences/inc/class.bocategories.inc.php @@ -124,7 +124,7 @@ } else { - if (!$values['cat_parent']) + if (!$values['parent']) { $exists = $this->exists(array ( @@ -145,7 +145,7 @@ if ($exists == True) { - $error[] = lang('That name has been used already'); + $error[] = lang('This name has been used already'); } } diff --git a/preferences/inc/class.uicategories.inc.php b/preferences/inc/class.uicategories.inc.php index e2f207c8c2..b161440367 100644 --- a/preferences/inc/class.uicategories.inc.php +++ b/preferences/inc/class.uicategories.inc.php @@ -76,6 +76,16 @@ $this->t->set_var('lang_reset',lang('Clear Form')); } + + function cat_data($edata,$data) + { + for ($j=0;$j' . "\n"; + } + return $td_data; + } + function index() { global $cats_app, $extra, $global_cats, $cats_level; @@ -189,11 +199,7 @@ } else { - for ($j=0;$j' . "\n"; - } - $this->t->set_var('td_data',$td_data); + $this->t->set_var('td_data',$this->cat_data($edata,$data)); } } @@ -274,7 +280,7 @@ $cat_parent = $GLOBALS['HTTP_POST_VARS']['cat_parent'] ? $GLOBALS['HTTP_POST_VARS']['cat_parent'] : $GLOBALS['HTTP_GET_VARS']['cat_parent']; $cat_name = $GLOBALS['HTTP_POST_VARS']['cat_name']; $cat_description = $GLOBALS['HTTP_POST_VARS']['cat_description']; -// $cat_data = $GLOBALS['HTTP_POST_VARS']['cat_data']; + $cat_data = $GLOBALS['HTTP_POST_VARS']['cat_data']; $cat_access = $GLOBALS['HTTP_POST_VARS']['cat_access']; $this->t->set_file(array('form' => 'category_form.tpl')); @@ -297,7 +303,6 @@ $values = array ( - 'id' => '', 'parent' => $cat_parent, 'descr' => $cat_description, 'name' => $cat_name, @@ -354,7 +359,6 @@ if ($extra) { $edata = explode(',',$extra); - $cat_data = array(); for($i=0;$it->set_var('td_data','');