From ecb259f2ed345faa63958ef359e450eccc400b05 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 15 Feb 2011 11:35:33 +0000 Subject: [PATCH] if contact in $_GET[participants] parameter for edit is a user, use the user instead --- calendar/inc/class.calendar_uiforms.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 79590e4c0e..7fcf765529 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -126,6 +126,15 @@ class calendar_uiforms extends calendar_ui } elseif (is_array($this->bo->resources[$uid[0]])) { + // if contact is a user, use the user instead (as the GUI) + if ($uid[0] == 'c' && ($account_id = $GLOBALS['egw']->accounts->name2id(substr($uid,1),'person_id'))) + { + $uid = $account_id; + $participants[$uid] = $participant_types['u'][$uid] = + calendar_so::combine_status($uid == $this->user ? 'A' : 'U',1, + ($uid == $this->user || ($uid == $owner && $this->bo->check_perms(EGW_ACL_ADD,0,$owner))) ? 'CHAIR' : 'REQ-PARTICIPANT'); + continue; + } $res_data = $this->bo->resources[$uid[0]]; list($id,$quantity) = explode(':',substr($uid,1)); if (($status = $res_data['new_status'] ? ExecMethod($res_data['new_status'],$id) : 'U'))