From d96f9678d953cb07b37ad5f7a1df988e9eaedf6e Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 12 Oct 2021 09:11:40 +1300 Subject: [PATCH] Remove another call to getTokenDetails The goal is to make the tokenValues hook uncalled outside the token processor & hence redundant. We were trying to do that in 5.43 but this call is not using the results anyway so I guess putting in master is immaterial to that goal --- CRM/Contact/Form/Task/SMSCommon.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/CRM/Contact/Form/Task/SMSCommon.php b/CRM/Contact/Form/Task/SMSCommon.php index 84a657f64a..e4604aa6d9 100644 --- a/CRM/Contact/Form/Task/SMSCommon.php +++ b/CRM/Contact/Form/Task/SMSCommon.php @@ -156,19 +156,10 @@ class CRM_Contact_Form_Task_SMSCommon { } if (is_array($form->_contactIds) && !empty($form->_contactIds) && $toSetDefault) { - $returnProperties = [ - 'sort_name' => 1, - 'phone' => 1, - 'do_not_sms' => 1, - 'is_deceased' => 1, - 'display_name' => 1, - ]; - - list($form->_contactDetails) = CRM_Utils_Token::getTokenDetails($form->_contactIds, - $returnProperties, - FALSE, - FALSE - ); + $form->_contactDetails = civicrm_api3('Contact', 'get', [ + 'id' => ['IN' => $form->_contactIds], + 'return' => ['sort_name', 'phone', 'do_not_sms', 'is_deceased', 'display_name'], + ])['values']; // make a copy of all contact details $form->_allContactDetails = $form->_contactDetails; -- 2.25.1