From d10c9706a97045b5bb35e423b951ce9588f5e145 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 3 Nov 2021 16:23:18 +1300 Subject: [PATCH] Remove calls to CRM_Utils_Token::getDomainTokenReplacement These values are no longer used .... --- CRM/Event/BAO/Participant.php | 20 -------------------- CRM/Event/Form/SelfSvcTransfer.php | 17 ----------------- CRM/Event/Form/SelfSvcUpdate.php | 1 - 3 files changed, 38 deletions(-) diff --git a/CRM/Event/BAO/Participant.php b/CRM/Event/BAO/Participant.php index fe04ccd7ac..d72012f5c1 100644 --- a/CRM/Event/BAO/Participant.php +++ b/CRM/Event/BAO/Participant.php @@ -1197,7 +1197,6 @@ UPDATE civicrm_participant //pull required participants, contacts, events data, if not in hand static $eventDetails = []; - static $domainValues = []; static $contactDetails = []; $contactIds = $eventIds = $participantDetails = []; @@ -1235,20 +1234,6 @@ UPDATE civicrm_participant } } - //get the domain values. - if (empty($domainValues)) { - // making all tokens available to templates. - $domain = CRM_Core_BAO_Domain::getDomain(); - $tokens = [ - 'domain' => ['name', 'phone', 'address', 'email'], - 'contact' => CRM_Core_SelectValues::contactTokens(), - ]; - - foreach ($tokens['domain'] as $token) { - $domainValues[$token] = CRM_Utils_Token::getDomainTokenReplacement($token, $domain); - } - } - //get all required contacts detail. if (!empty($contactIds)) { // get the contact details. @@ -1328,7 +1313,6 @@ UPDATE civicrm_participant $participantDetails[$additionalId], $eventDetails[$participantDetails[$additionalId]['event_id']], $contactDetails[$participantDetails[$additionalId]['contact_id']], - $domainValues, $emailType ); @@ -1348,7 +1332,6 @@ UPDATE civicrm_participant $participantValues, $eventDetails[$participantValues['event_id']], $contactDetails[$participantValues['contact_id']], - $domainValues, $emailType ); @@ -1394,8 +1377,6 @@ UPDATE civicrm_participant * Required event details. * @param array $contactDetails * Required contact details. - * @param array $domainValues - * Required domain values. * @param string $mailType * (eg 'approval', 'confirm', 'expired' ). * @@ -1406,7 +1387,6 @@ UPDATE civicrm_participant $participantValues, $eventDetails, $contactDetails, - $domainValues, $mailType ) { //send emails. diff --git a/CRM/Event/Form/SelfSvcTransfer.php b/CRM/Event/Form/SelfSvcTransfer.php index c26f468a30..1cac955aae 100644 --- a/CRM/Event/Form/SelfSvcTransfer.php +++ b/CRM/Event/Form/SelfSvcTransfer.php @@ -417,22 +417,6 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form { * return @ void */ public function sendCancellation() { - $domainValues = []; - $domain = CRM_Core_BAO_Domain::getDomain(); - $tokens = [ - 'domain' => - [ - 'name', - 'phone', - 'address', - 'email', - ], - 'contact' => CRM_Core_SelectValues::contactTokens(), - ]; - foreach ($tokens['domain'] as $token) { - $domainValues[$token] = CRM_Utils_Token::getDomainTokenReplacement($token, $domain); - } - $participantRoles = CRM_Event_PseudoConstant::participantRole(); $participantDetails = []; $query = "SELECT * FROM civicrm_participant WHERE id = {$this->_from_participant_id}"; @@ -463,7 +447,6 @@ class CRM_Event_Form_SelfSvcTransfer extends CRM_Core_Form { $participantDetails[$this->_from_participant_id], $eventDetails[$this->_event_id], NULL, - $domainValues, 'Transferred' ); $statusMsg = ts('Event registration information for %1 has been updated.', [1 => $this->_contact_name]); diff --git a/CRM/Event/Form/SelfSvcUpdate.php b/CRM/Event/Form/SelfSvcUpdate.php index 12470484b6..97a51481da 100644 --- a/CRM/Event/Form/SelfSvcUpdate.php +++ b/CRM/Event/Form/SelfSvcUpdate.php @@ -287,7 +287,6 @@ class CRM_Event_Form_SelfSvcUpdate extends CRM_Core_Form { $participantDetails[$this->_participant_id], $eventDetails[$this->_event_id], NULL, - NULL, 'Cancelled' ); $statusMsg = ts('Event registration information for %1 has been updated.', [1 => $this->_contact_name]); -- 2.25.1