Skip to content

Commit

Permalink
Remove call to getTokenDetails
Browse files Browse the repository at this point in the history
This is tested vi CRM_Event_Form_Task_BatchTest::testSubmitCancel
  • Loading branch information
eileenmcnaughton committed Nov 4, 2021
1 parent c158e60 commit 4b599bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
14 changes: 3 additions & 11 deletions CRM/Event/BAO/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -1236,15 +1236,7 @@ public static function transitionParticipants(

//get all required contacts detail.
if (!empty($contactIds)) {
// get the contact details.
list($currentContactDetails) = CRM_Utils_Token::getTokenDetails($contactIds, NULL,
FALSE, FALSE, NULL,
[],
'CRM_Event_BAO_Participant'
);
foreach ($currentContactDetails as $contactId => $contactValues) {
$contactDetails[$contactId] = $contactValues;
}
$contactDetails = civicrm_api3('Contact', 'get', ['id' => ['IN' => $contactIds, 'return' => 'display_name']])['values'];
}

//get all required events detail.
Expand Down Expand Up @@ -1312,7 +1304,7 @@ public static function transitionParticipants(
$mail = self::sendTransitionParticipantMail($additionalId,
$participantDetails[$additionalId],
$eventDetails[$participantDetails[$additionalId]['event_id']],
$contactDetails[$participantDetails[$additionalId]['contact_id']],
NULL,
$emailType
);

Expand All @@ -1331,7 +1323,7 @@ public static function transitionParticipants(
$mail = self::sendTransitionParticipantMail($participantId,
$participantValues,
$eventDetails[$participantValues['event_id']],
$contactDetails[$participantValues['contact_id']],
NULL,
$emailType
);

Expand Down
1 change: 0 additions & 1 deletion CRM/Utils/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,6 @@ public static function getTokenDetails(
$className = NULL,
$jobID = NULL
) {

$params = [];
foreach ($contactIDs as $contactID) {
$params[] = [
Expand Down

0 comments on commit 4b599bf

Please sign in to comment.