X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FTokens.php;h=40a5c832a9beeb8cf8fc7ec5818c657fc44c27f5;hb=d7b226af900687b6e59e098329fbedf6e0d861a7;hp=c7fe1fdbda9a5aaf92677774a6359ad661398318;hpb=87b743322324b0c46aa1cc70b2ce971846bf87e3;p=civicrm-core.git diff --git a/CRM/Contribute/Tokens.php b/CRM/Contribute/Tokens.php index c7fe1fdbda..40a5c832a9 100644 --- a/CRM/Contribute/Tokens.php +++ b/CRM/Contribute/Tokens.php @@ -85,6 +85,7 @@ class CRM_Contribute_Tokens extends \Civi\Token\AbstractTokenSubscriber { $tokens['source'] = ts('Contribution Source'); $tokens['status'] = ts('Contribution Status'); $tokens['type'] = ts('Financial Type'); + $tokens = array_merge($tokens, $this->getCustomTokens('Contribution')); parent::__construct('contribution', $tokens); } @@ -135,6 +136,9 @@ class CRM_Contribute_Tokens extends \Civi\Token\AbstractTokenSubscriber { elseif (isset($aliasTokens[$field])) { $row->dbToken($entity, $field, 'CRM_Contribute_BAO_Contribution', $aliasTokens[$field], $fieldValue); } + elseif ($cfID = \CRM_Core_BAO_CustomField::getKeyID($field)) { + $row->customToken($entity, $cfID, $actionSearchResult->entity_id); + } else { $row->dbToken($entity, $field, 'CRM_Contribute_BAO_Contribution', $field, $fieldValue); }