From 2de68f744c160d514ac4bc179723d7e7e3f2b2b7 Mon Sep 17 00:00:00 2001 From: eileen Date: Thu, 3 Oct 2019 08:55:33 +0200 Subject: [PATCH] Fix regression in handling of post profiles in email --- CRM/Event/BAO/Event.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Event/BAO/Event.php b/CRM/Event/BAO/Event.php index 09f06ac9cc..16d3632aa5 100644 --- a/CRM/Event/BAO/Event.php +++ b/CRM/Event/BAO/Event.php @@ -1143,6 +1143,10 @@ WHERE civicrm_event.is_active = 1 // @todo - the goal is that all params available to the message template are explicitly defined here rather than // 'in a smattering of places'. Note that leakage can happen between mailings when not explicitly defined. + $customPostTitles = empty($profilePost[1]) ? NULL : []; + foreach ($postProfileID as $id) { + $customPostTitles[$id] = CRM_Core_BAO_UFGroup::getFrontEndTitle((int) $postProfileID); + } $tplParams = array_merge($values, $participantParams, [ 'email' => $email, 'confirm_email_text' => CRM_Utils_Array::value('confirm_email_text', $values['event']), @@ -1152,7 +1156,7 @@ WHERE civicrm_event.is_active = 1 'customPre' => $profilePre[0], 'customPre_grouptitle' => empty($profilePre[1]) ? NULL : [CRM_Core_BAO_UFGroup::getFrontEndTitle((int) $preProfileID)], 'customPost' => $profilePost[0], - 'customPost_grouptitle' => empty($profilePost[1]) ? NULL : [CRM_Core_BAO_UFGroup::getFrontEndTitle((int) $postProfileID)], + 'customPost_grouptitle' => $customPostTitles, 'participantID' => $participantId, 'conference_sessions' => $sessions, 'credit_card_number' => CRM_Utils_System::mungeCreditCard(CRM_Utils_Array::value('credit_card_number', $participantParams)), -- 2.25.1