Skip to content
Snippets Groups Projects
Unverified Commit 12a29dde authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #21337 from eileenmcnaughton/tokens

#2806 Fix accidental exposure of v4 tokens
parents c9fc067e c2f1897e
Branches
Tags
No related merge requests found
......@@ -321,7 +321,12 @@ class CRM_Core_EntityTokens extends AbstractTokenSubscriber {
public function getBasicTokens(): array {
$return = [];
foreach ($this->getExposedFields() as $fieldName) {
$return[$fieldName] = $this->getFieldMetadata()[$fieldName]['title'];
// Custom fields are still added v3 style - we want to keep v4 naming 'unpoluted'
// for now to allow us to consider how to handle names vs labels vs values
// and other raw vs not raw options.
if ($this->getFieldMetadata()[$fieldName]['type'] !== 'Custom') {
$return[$fieldName] = $this->getFieldMetadata()[$fieldName]['title'];
}
}
return $return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment