mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
Fix resource categories to work when first added from search results
This commit is contained in:
parent
0d37c8413f
commit
0f571fe7a2
@ -550,15 +550,19 @@ class resources_bo
|
|||||||
// Edit dialog sends exec as an option, don't add categories
|
// Edit dialog sends exec as an option, don't add categories
|
||||||
if(count($resources) && !$options['exec'])
|
if(count($resources) && !$options['exec'])
|
||||||
{
|
{
|
||||||
|
$_resources = array_map(
|
||||||
|
function($id) { return 'r'.$id;},
|
||||||
|
array_keys($resources)
|
||||||
|
);
|
||||||
$list['cat-'.$cat_id] = array(
|
$list['cat-'.$cat_id] = array(
|
||||||
'label' => $cat,
|
'label' => $cat,
|
||||||
'resources' => $resources,
|
'resources' => $_resources,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if ($resources && $options['exec'])
|
else if ($resources && $options['exec'])
|
||||||
{
|
{
|
||||||
array_map(
|
array_map(
|
||||||
function($id,$name) use (&$list) { $list[''+$id] = $name;},
|
function($id,$name) use (&$list) { $list[''.$id] = $name;},
|
||||||
array_keys($resources), $resources
|
array_keys($resources), $resources
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user