mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Add check for automatic 'All' option to avoid extra 'All' options when app stores category options in session.
This commit is contained in:
parent
e5b1c65045
commit
f561e7e7bf
@ -174,7 +174,14 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
if(!$value['no_cat'] && !$value['cat_is_select'])
|
||||
{
|
||||
$cat_app = $value['cat_app'] ? $value['cat_app'] : $GLOBALS['egw_info']['flags']['current_app'];
|
||||
$value['options-cat_id'] = array('' => lang('all')) +
|
||||
$value['options-cat_id'] = array();
|
||||
|
||||
// Add 'All', if not already there
|
||||
if(!$value['options-cat_id'][''] && !($value['options-cat_id'][0] && $value['options-cat_id'][0]['value'] == ''))
|
||||
{
|
||||
$value['options-cat_id'][''] = lang('all');
|
||||
}
|
||||
$value['options-cat_id'] +=
|
||||
etemplate_widget_menupopup::typeOptions('select-cat', ',,'.$cat_app,$no_lang,false,$value['cat_id']) +
|
||||
(array)$value['options-cat_id'];
|
||||
etemplate_widget_menupopup::fix_encoded_options($value['options-cat_id']);
|
||||
|
Loading…
Reference in New Issue
Block a user