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:
098656a
)
[dev/core#412] Avoid truncated UTF-8 strings when using substr()
author
Jens Schuppe
<schuppe@systopia.de>
Mon, 15 Oct 2018 09:14:51 +0000
(11:14 +0200)
committer
Jens Schuppe
<schuppe@systopia.de>
Mon, 15 Oct 2018 09:14:51 +0000
(11:14 +0200)
CRM/Core/BAO/Mapping.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/BAO/Mapping.php
b/CRM/Core/BAO/Mapping.php
index 1764cd572f1a7fe2ecfbefeea1835f4af4414315..3e8b324a360b1e12130cd9b8684af34159874402 100644
(file)
--- a/
CRM/Core/BAO/Mapping.php
+++ b/
CRM/Core/BAO/Mapping.php
@@
-997,9
+997,7
@@
class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
$customGroupId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField', $customFieldId, 'custom_group_id');
$customGroupName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $customGroupId, 'title');
- if (strlen($customGroupName) > 13) {
- $customGroupName = substr($customGroupName, 0, 10) . '...';
- }
+ $customGroupName = CRM_Utils_String::ellipsify($customGroupName, 13);
return $customGroupName;
}