From a1da1a6fa666f6243b1d3b70cc76895417426ecd Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 23 Dec 2022 10:45:53 -0700 Subject: [PATCH] Calendar: Fix user listed in participants twice when creating an event from an email --- calendar/inc/class.calendar_uiforms.inc.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 03d951e336..f9c45dea58 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -573,7 +573,7 @@ class calendar_uiforms extends calendar_ui if (is_numeric($uid)) { $id = $uid; - $type = 'u'; + $type = ''; } else { @@ -3500,21 +3500,21 @@ class calendar_uiforms extends calendar_ui $AB = new Api\Contacts(); $accounts = array(0 => $GLOBALS['egw_info']['user']['account_id']); - $participants[0] = array ( - 'uid' => $GLOBALS['egw_info']['user']['account_id'], - 'delete_id' => $GLOBALS['egw_info']['user']['account_id'], - 'status' => 'A', + $participants[0] = array( + 'uid' => $GLOBALS['egw_info']['user']['account_id'], + 'delete_id' => $GLOBALS['egw_info']['user']['account_id'], + 'status' => 'A', 'old_status' => 'A', - 'app' => 'User', - 'role' => 'REQ-PARTICIPANT' + 'app' => 'api-accounts', + 'role' => 'REQ-PARTICIPANT' ); foreach($mailContent['addresses'] as $address) { // Get available contacts from the email $contacts = $AB->search(array( - 'email' => $address['email'], - 'email_home' => $address['email'] - ),'contact_id,contact_email,contact_email_home,egw_addressbook.account_id as account_id','','','',false,'OR',false,array('owner' => 0),'',false); + 'email' => $address['email'], + 'email_home' => $address['email'] + ), 'contact_id,contact_email,contact_email_home,egw_addressbook.account_id as account_id', '', '', '', false, 'OR', false, array('owner' => 0), '', false); if (is_array($contacts)) { foreach($contacts as $account)