Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge branch '2021.11' into 2022.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Mar 14, 2022
2 parents 44e4d1f + c3b83bd commit 3922e1b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tine20/Calendar/Model/Attender.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,16 @@ public static function resolveGroupMembers($_attendee)
$list = Addressbook_Controller_List::getInstance()->get($groupAttender->user_id);
$listId = $list->getId();
} catch (Exception $e) {
// lets try group
$group = Tinebase_Group::getInstance()->getGroupById($groupAttender->user_id);
if (!empty($group->list_id)) {
Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' fixme: depricated use of group id');
$groupAttender->user_id = $listId = $group->list_id;
// let's try group
try {
$group = Tinebase_Group::getInstance()->getGroupById($groupAttender->user_id);
if (!empty($group->list_id)) {
Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' fixme: depricated use of group id');
$groupAttender->user_id = $listId = $group->list_id;
}
} catch (Tinebase_Exception_Record_NotDefined $ternd) {
if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
. ' ' . $ternd->getMessage());
}
}
} else {
Expand All @@ -751,7 +756,7 @@ public static function resolveGroupMembers($_attendee)

$toAdd = array_diff($groupAttenderContactIds, $allCurrGroupMembersContactIds);

foreach($toAdd as $userId) {
foreach ($toAdd as $userId) {
$_attendee->addRecord(new Calendar_Model_Attender(array(
'user_type' => Calendar_Model_Attender::USERTYPE_GROUPMEMBER,
'user_id' => $userId,
Expand Down

0 comments on commit 3922e1b

Please sign in to comment.