fix: cats where not recongnised on large number of cats

fix: cats where not displayed after creation
This commit is contained in:
Cornelius Weiß 2006-01-17 16:49:46 +00:00
parent 0c9f991149
commit a45d978366
2 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ class bo_acl
} }
} }
$this->save_sessiondata(); $this->save_sessiondata();
$this->cats = $this->egw_cats->return_sorted_array(0,False); $this->cats = $this->egw_cats->return_sorted_array(0,false,'','','',true);
} }
} }
@ -73,7 +73,7 @@ class bo_acl
*/ */
function get_cats($perm_type) function get_cats($perm_type)
{ {
$cats = $this->egw_cats->return_sorted_array(0,true,'','','',true); $cats = $this->egw_cats->return_sorted_array(0,false,'','','',true);
while (list(,$cat) = @each($cats)) while (list(,$cat) = @each($cats))
{ {
if($this->is_permitted($cat['id'],$perm_type)) if($this->is_permitted($cat['id'],$perm_type))

View File

@ -102,7 +102,6 @@ class ui_resources
$content['nm']['no_filter'] = False; $content['nm']['no_filter'] = False;
$content['nm']['filter_label'] = 'Category'; $content['nm']['filter_label'] = 'Category';
$content['nm']['filter_help'] = lang('Select a category'); // is this used??? $content['nm']['filter_help'] = lang('Select a category'); // is this used???
$content['nm']['options-filter']= array(''=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ);
$content['nm']['no_filter2'] = true; $content['nm']['no_filter2'] = true;
$content['nm']['filter_no_lang'] = true; $content['nm']['filter_no_lang'] = true;
$content['nm']['no_cat'] = true; $content['nm']['no_cat'] = true;
@ -115,6 +114,7 @@ class ui_resources
{ {
$content['nm'] = $nm_session_data; $content['nm'] = $nm_session_data;
} }
$content['nm']['options-filter']= array(''=>lang('all categories'))+(array)$this->bo->acl->get_cats(EGW_ACL_READ);
// check if user is permitted to add resources // check if user is permitted to add resources
if(!$this->bo->acl->get_cats(EGW_ACL_ADD)) if(!$this->bo->acl->get_cats(EGW_ACL_ADD))