From 075c519bc895ed5c9ec3f6679eed86a1aacd1b44 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 13 Sep 2021 11:46:07 +1200 Subject: [PATCH] [REF] Remove unused parameter There are no longer any cases in git universe that pass this parameter --- CRM/Utils/Token.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index 46990bed09..2e16be7528 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -1820,18 +1820,14 @@ class CRM_Utils_Token { * Get all custom field tokens of $entity * * @param string $entity - * @param bool $usedForTokenWidget - * * @return array * return custom field tokens in array('custom_N' => 'label') format */ - public static function getCustomFieldTokens($entity, $usedForTokenWidget = FALSE) { + public static function getCustomFieldTokens($entity) { $customTokens = []; - $tokenName = $usedForTokenWidget ? "{contribution.custom_%d}" : "custom_%d"; foreach (CRM_Core_BAO_CustomField::getFields($entity) as $id => $info) { - $customTokens[sprintf($tokenName, $id)] = $info['label'] . ' :: ' . $info['groupTitle']; + $customTokens['custom_' . $id] = $info['label'] . ' :: ' . $info['groupTitle']; } - return $customTokens; } -- 2.25.1