projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9467f0c
)
dev/core#503 - More accurate custom field checking before htmlEncode
author
Coleman Watts
<coleman@civicrm.org>
Fri, 9 Nov 2018 15:42:39 +0000
(10:42 -0500)
committer
Coleman Watts
<coleman@civicrm.org>
Fri, 9 Nov 2018 18:09:09 +0000
(13:09 -0500)
CRM/Utils/API/AbstractFieldCoder.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/API/AbstractFieldCoder.php
b/CRM/Utils/API/AbstractFieldCoder.php
index b2c843326e5ccccad58f8c67767e77af071d4b88..7d427b2b51019df894a637e090cdca08f5f3894a 100644
(file)
--- a/
CRM/Utils/API/AbstractFieldCoder.php
+++ b/
CRM/Utils/API/AbstractFieldCoder.php
@@
-63,6
+63,11
@@
abstract class CRM_Utils_API_AbstractFieldCoder implements API_Wrapper {
if ($skipFields === NULL) {
return FALSE;
}
+ // Strip extra numbers from custom fields e.g. custom_32_1 should be custom_32
+ if (strpos($fldName, 'custom_') === 0) {
+ list($fldName, $customId) = explode('_', $fldName);
+ $fldName .= '_' . $customId;
+ }
// Field should be skipped
if (in_array($fldName, $skipFields)) {