diff --git a/admin/addcategory.php b/admin/addcategory.php index c5ac509aa6..1b83b8bbc3 100644 --- a/admin/addcategory.php +++ b/admin/addcategory.php @@ -48,7 +48,7 @@ $t->set_var('hidden_vars',''); $t->set_var('lang_select_parent',lang('Select parent category')); - $t->set_var('category_list',$c->formated_list('select','False','all',$cat_parent)); + $t->set_var('category_list',$c->formated_list('select','all',$cat_parent,'False')); $t->set_var('lang_name',lang('Category name')); $t->set_var('lang_descr',lang('Category description')); $t->set_var('cat_name',$cat_name); diff --git a/admin/categories.php b/admin/categories.php index 609e5ea7c4..660f8ee0b4 100644 --- a/admin/categories.php +++ b/admin/categories.php @@ -46,7 +46,7 @@ $c = CreateObject('phpgwapi.categories'); $c->categories($phpgw_info['user']['account_id'],'phpgw'); - $categories = $c->return_array('False','all',$start,$limit,$query,$sort,$order); + $categories = $c->return_array('all',$start,$limit,$query,$sort,$order,'False'); //--------------------------------- nextmatch -------------------------------------------- diff --git a/admin/editcategory.php b/admin/editcategory.php index 3a5932ae0d..ae572eca64 100644 --- a/admin/editcategory.php +++ b/admin/editcategory.php @@ -71,7 +71,7 @@ $t->set_var('cat_name',$phpgw->strip_html($cats[0]['name'])); $t->set_var('cat_description',$phpgw->strip_html($cats[0]['description'])); - $t->set_var('category_list',$c->formated_list('select','False','all',$cat_parent)); + $t->set_var('category_list',$c->formated_list('select','all',$cat_parent,'False')); $t->set_var('edithandle',''); $t->set_var('addhandle',''); diff --git a/phpgwapi/inc/class.categories.inc.php b/phpgwapi/inc/class.categories.inc.php index d9da2cd42e..7a35f24255 100644 --- a/phpgwapi/inc/class.categories.inc.php +++ b/phpgwapi/inc/class.categories.inc.php @@ -82,7 +82,7 @@ @param $order order by @result $cats array */ - function return_array($public = 'False',$type = 'all',$start,$limit,$query = '',$sort = '',$order = '') + function return_array($type = 'all',$start,$limit,$query = '',$sort = '',$order = '',$public = 'False') { global $phpgw, $phpgw_info; @@ -181,7 +181,7 @@ $this->app_name = $app_name; $this->db = $phpgw->db; $this->total_records = $this->db->num_rows(); - $this->cats = $this->return_array($public,$type,$start,$limit,$query,$sort,$order); + $this->cats = $this->return_array($type,$start,$limit,$query,$sort,$order,$public); } // Return into a select box, list or other formats @@ -193,7 +193,7 @@ @param $selected ? @result $s array - populated with categories */ - function formated_list($format,$public = 'False',$type,$selected = "") + function formated_list($format,$type,$selected = '',$public = 'False') { global $phpgw; $filter = $this->filter($type);