From 45e27331e97f115c2bb47d76196f6156c5ecf820 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 15 May 2012 11:20:32 +0000 Subject: [PATCH] * Calendar: taking direct booking permission into account when copying events including resources (my.stylite bug #2839) --- calendar/inc/class.calendar_uiforms.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 6a0183c909..7cda395e05 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -494,7 +494,9 @@ class calendar_uiforms extends calendar_ui { if($type == 'u' && $id == $event['owner']) continue; calendar_so::split_status($status, $quantity, $role); - $response = calendar_so::combine_status('U',$quantity,$role); + // if resource defines callback for status of new status (eg. Resources app acknowledges direct booking acl), call it + $status = isset($this->bo->resources[$type]['new_status']) ? ExecMethod($this->bo->resources[$type]['new_status'],$id) : 'U'; + $response = calendar_so::combine_status($status,$quantity,$role); } } $preserv['view'] = $preserv['edit_single'] = false;