Skip to content

Commit

Permalink
Remove another call to getTokenDetails
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eileenmcnaughton committed Oct 11, 2021
1 parent 8766a2e commit 440199c
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions CRM/Contact/Form/Task/SMSCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,10 @@ public static function buildQuickForm(&$form) {
}

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;
Expand Down

0 comments on commit 440199c

Please sign in to comment.