mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 13:39:23 +01:00
Apply global categories when creating a timesheet from an event.
This commit is contained in:
parent
39d0fbf9ae
commit
6b7dee0c5b
@ -494,6 +494,21 @@ class calendar_uilist extends calendar_ui
|
|||||||
'cat_id' => null,
|
'cat_id' => null,
|
||||||
'pl_id' => null
|
'pl_id' => null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Add global categories
|
||||||
|
$categories = explode(',',$event['category']);
|
||||||
|
$global_categories = array();
|
||||||
|
foreach($categories as $cat_id)
|
||||||
|
{
|
||||||
|
if($GLOBALS['egw']->categories->is_global($cat_id))
|
||||||
|
{
|
||||||
|
$global_categories[] = $cat_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(count($global_categories))
|
||||||
|
{
|
||||||
|
$timesheet['cat_id'] = implode(',', $global_categories);
|
||||||
|
}
|
||||||
$timesheet_bo->data = array();
|
$timesheet_bo->data = array();
|
||||||
$err = $timesheet_bo->save($timesheet);
|
$err = $timesheet_bo->save($timesheet);
|
||||||
if(!$err) {
|
if(!$err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user