Restore 'All categories' for preferences

This commit is contained in:
Nathan Gray 2011-06-22 19:59:22 +00:00
parent a7bccd968c
commit a9cd9ed96d

View File

@ -373,6 +373,7 @@ class admin_categories
'get_rows' => $this->get_rows, // I method/callback to request the data for the rows eg. 'notes.bo.get_rows' 'get_rows' => $this->get_rows, // I method/callback to request the data for the rows eg. 'notes.bo.get_rows'
'no_filter' => ($appname == categories::GLOBAL_APPNAME),// Can't have personal categories in global 'no_filter' => ($appname == categories::GLOBAL_APPNAME),// Can't have personal categories in global
'options-filter' => array( 'options-filter' => array(
'' => lang('All categories'),
categories::GLOBAL_ACCOUNT => lang('Global categories'), categories::GLOBAL_ACCOUNT => lang('Global categories'),
$GLOBALS['egw_info']['user']['account_id'] => lang('Own categories'), $GLOBALS['egw_info']['user']['account_id'] => lang('Own categories'),
), ),
@ -441,10 +442,8 @@ class admin_categories
$content['add_link']= $this->add_link.'&appname='.$appname; $content['add_link']= $this->add_link.'&appname='.$appname;
$content['edit_link']= $this->edit_link.'&appname='.$appname; $content['edit_link']= $this->edit_link.'&appname='.$appname;
$readonlys['add'] = !self::$acl_add; $readonlys['add'] = !self::$acl_add;
if($GLOBALS['egw_info']['user']['apps']['admin']) if(!$GLOBALS['egw_info']['user']['apps']['admin'])
{ {
$content['nm']['options-filter'][''] = lang('All categories');
} else {
$readonlys['nm']['rows']['owner'] = true; $readonlys['nm']['rows']['owner'] = true;
$readonlys['nm']['col_filter']['owner'] = true; $readonlys['nm']['col_filter']['owner'] = true;
} }