Skip to content

Commit

Permalink
fix for greeting token
Browse files Browse the repository at this point in the history
  • Loading branch information
monishdeb committed Jan 10, 2017
1 parent 213677d commit 8775170
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Civi/Token/TokenCompatSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ public function onRender(TokenRenderEvent $e) {
$e->string = \CRM_Utils_Token::replaceDomainTokens($e->string, \CRM_Core_BAO_Domain::getDomain(), $isHtml, $e->message['tokens'], $useSmarty);

if (!empty($e->context['contact'])) {
\CRM_Utils_Token::replaceGreetingTokens($e->string, $e->context['contact'], $e->context['contact']['contact_id'], NULL, FALSE);

$e->string = \CRM_Utils_Token::replaceContactTokens($e->string, $e->context['contact'], $isHtml, $e->message['tokens'], FALSE, $useSmarty);

// FIXME: This may depend on $contact being merged with hook values.
$e->string = \CRM_Utils_Token::replaceHookTokens($e->string, $e->context['contact'], $e->context['hookTokenCategories'], $isHtml, $useSmarty);

\CRM_Utils_Token::replaceGreetingTokens($e->string, NULL, $e->context['contact']['contact_id'], NULL, $useSmarty);
}

if ($useSmarty) {
Expand Down

0 comments on commit 8775170

Please sign in to comment.