diff --git a/admin/inc/class.bocategories.inc.php b/admin/inc/class.bocategories.inc.php index dfb9c7eb17..0f8b2a6ba7 100644 --- a/admin/inc/class.bocategories.inc.php +++ b/admin/inc/class.bocategories.inc.php @@ -138,14 +138,7 @@ function formatted_list($data) { - if ($data['globals']) - { - return $this->cats->formated_list($data['select'],$data['all'],$data['parent'],True); - } - else - { - return $this->cats->formated_list($data['select'],$data['all'],$data['parent']); - } + return $this->cats->formatted_list($data); } function delete($data) diff --git a/admin/inc/class.uicategories.inc.php b/admin/inc/class.uicategories.inc.php index 0966d5a616..ab720b473f 100644 --- a/admin/inc/class.uicategories.inc.php +++ b/admin/inc/class.uicategories.inc.php @@ -289,7 +289,7 @@ $parent = $values['parent']; } - $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list(array('format' => 'select', + $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formatted_list(array('format' => 'select', 'type' => 'all', 'selected' => $parent, 'globals' => $global_cats))); @@ -372,10 +372,10 @@ $GLOBALS['phpgw']->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cats['name'])); $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', - 'parent' => $cats['parent'], - 'global_cats' => $global_cats))); + $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formatted_list(array('format' => 'select', + 'type' => 'all', + 'selected' => $cats['parent'], + 'globals' => $global_cats))); $GLOBALS['phpgw']->template->parse('buttons','edit'); $GLOBALS['phpgw']->template->fp('phpgw_body','form'); } diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index 3e5e2a23ef..351063e372 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -326,9 +326,9 @@ @param $id integer id of category @result $cats array populated with */ - function return_single($id = '') + function return_single($cat_id = '') { - $this->db->query('SELECT * FROM phpgw_categories WHERE cat_id=' . intval($id),__LINE__,__FILE__); + $this->db->query('SELECT * FROM phpgw_categories WHERE cat_id=' . intval($cat_id),__LINE__,__FILE__); list($cat) = $this->db2cats(); @@ -336,7 +336,7 @@ } /*! - @function formated_list + @function formatted_list @abstract return into a select box, list or other formats @param $format currently only supports select (select box) @param $type string - subs or mains @@ -344,12 +344,8 @@ @param $globals True or False, includes the global phpgroupware categories or not @result $s array - populated with categories */ - function formatted_list($format,$type = 'all',$selected = '',$globals = False,$site_link = 'site') - { - return $this->formated_list($format,$type,$selected,$globals,$site_link); - } - function formated_list($format,$type = 'all',$selected = '',$globals = False,$site_link = 'site') + function formatted_list($format,$type = 'all',$selected = '',$globals = False,$site_link = 'site') { if(is_array($format)) { diff --git a/preferences/inc/class.bocategories.inc.php b/preferences/inc/class.bocategories.inc.php index 48fece5dbb..141bdae741 100644 --- a/preferences/inc/class.bocategories.inc.php +++ b/preferences/inc/class.bocategories.inc.php @@ -119,9 +119,9 @@ return $this->cats->exists($data); } - function formatted_list($format,$type,$cat_parent,$global_cats) + function formatted_list($data) { - return $this->cats->formated_list($format,$type,$cat_parent,$global_cats); + return $this->cats->formatted_list($data); } function delete($data) diff --git a/preferences/inc/class.uicategories.inc.php b/preferences/inc/class.uicategories.inc.php index c38f59de18..e6ba598268 100644 --- a/preferences/inc/class.uicategories.inc.php +++ b/preferences/inc/class.uicategories.inc.php @@ -341,9 +341,9 @@ } $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formatted_list(array('format' => 'select', - 'type' => $type, - 'selected' => $parent, - 'globals' => $global_cats))); + 'type' => $type, + 'selected' => $parent, + 'globals' => $global_cats))); $GLOBALS['phpgw']->template->set_var('cat_name',$values['name']); $GLOBALS['phpgw']->template->set_var('cat_description',$values['descr']); @@ -455,7 +455,10 @@ $type = 'mains'; } - $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formated_list('select',$type,$cats['parent'],$global_cats)); + $GLOBALS['phpgw']->template->set_var('category_list',$this->bo->cats->formatted_list(array('format' => 'select', + 'type' => $type, + 'selected' => $cats['parent'], + 'globals' => $global_cats))); $GLOBALS['phpgw']->template->set_var('access',$cats['access'] == 'private'?' checked':'');