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:
1c2a31f
)
CRM-20779 - Fix image display in custom field tab
author
Coleman Watts
<coleman@civicrm.org>
Sat, 7 Oct 2017 17:32:44 +0000
(13:32 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Sat, 7 Oct 2017 17:32:44 +0000
(13:32 -0400)
CRM/Core/BAO/CustomField.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Core/BAO/CustomField.php
b/CRM/Core/BAO/CustomField.php
index 21d093fc48051300b9ef6b16f7b80c7807ef1c1f..4b1b11cfae7789c38546a50f28f6aecaf00aca0d 100644
(file)
--- a/
CRM/Core/BAO/CustomField.php
+++ b/
CRM/Core/BAO/CustomField.php
@@
-1247,7
+1247,13
@@
class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
// In the context of displaying a profile, show file/image
if ($value) {
if ($entityId) {
- $url = self::getFileURL($entityId, $field['id']);
+ if (CRM_Utils_Rule::positiveInteger($value)) {
+ $fileId = $value;
+ }
+ else {
+ $fileId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_File', $value, 'id', 'uri');
+ }
+ $url = self::getFileURL($entityId, $field['id'], $fileId);
if ($url) {
$display = $url['file_url'];
}