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:
3408e34
)
APIv4 - Respect max length for name with export action
author
Coleman Watts
<coleman@civicrm.org>
Tue, 17 May 2022 02:30:33 +0000
(22:30 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Tue, 17 May 2022 02:30:33 +0000
(22:30 -0400)
Civi/Api4/Generic/ExportAction.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Api4/Generic/ExportAction.php
b/Civi/Api4/Generic/ExportAction.php
index bb7e14a0c74394e58a28a56cb6279e625aeefc8d..3fc028dacb956efbad6eaff05face340cac50413 100644
(file)
--- a/
Civi/Api4/Generic/ExportAction.php
+++ b/
Civi/Api4/Generic/ExportAction.php
@@
-129,6
+129,8
@@
class ExportAction extends AbstractAction {
}
}
$name = ($parentName ?? '') . $entityType . '_' . ($record['name'] ?? count($this->exportedEntities[$entityType]));
+ // Ensure safe characters, max length
+ $name = \CRM_Utils_String::munge($name, '_', 127);
$result[] = [
'name' => $name,
'entity' => $entityType,