Skip to content

Commit

Permalink
Fold function only called from one place into caller, deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
eileenmcnaughton committed Nov 8, 2022
1 parent b84c918 commit 83c6eb9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CRM/Contact/BAO/Contact/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,8 @@ public static function updateGreeting($params) {
}
}

self::processGreetingTemplate($greetingString, [], $contactID, 'CRM_UpdateGreeting');
CRM_Utils_Token::replaceGreetingTokens($templateString, [], $contactID, 'CRM_UpdateGreeting', TRUE);
$templateString = CRM_Utils_String::parseOneOffStringThroughSmarty($templateString);
$greetingString = CRM_Core_DAO::escapeString($greetingString);
$cacheFieldQuery .= " WHEN {$contactID} THEN '{$greetingString}' ";

Expand Down Expand Up @@ -1115,11 +1116,14 @@ public static function getTokensRequiredForContactGreetings($contactParams) {
* @param string $templateString
* The greeting template string with contact tokens + Smarty syntax.
*
* @deprecated
*
* @param array $contactDetails
* @param int $contactID
* @param string $className
*/
public static function processGreetingTemplate(&$templateString, $contactDetails, $contactID, $className) {
CRM_Core_Error::deprecatedFunctionWarning('no replacement');
CRM_Utils_Token::replaceGreetingTokens($templateString, $contactDetails, $contactID, $className, TRUE);
$templateString = CRM_Utils_String::parseOneOffStringThroughSmarty($templateString);
}
Expand Down

0 comments on commit 83c6eb9

Please sign in to comment.