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:
70c06db
)
CRM-16076 - Restore file/image behavior in profiles
author
Coleman Watts
<coleman@civicrm.org>
Fri, 13 Mar 2015 01:57:53 +0000
(21:57 -0400)
committer
Coleman Watts
<coleman@civicrm.org>
Fri, 13 Mar 2015 01:57:53 +0000
(21:57 -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 5ea64fb31c694b7509484656e0e4360b3e4d41fb..d46ffb013987d3985409d46acfc574b256cd855f 100644
(file)
--- a/
CRM/Core/BAO/CustomField.php
+++ b/
CRM/Core/BAO/CustomField.php
@@
-1286,7
+1286,15
@@
class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
break;
case 'File':
- if ($value) {
+ // In the context of displaying a profile, show file/image
+ if ($contactID) {
+ $url = self::getFileURL($contactID, $fieldID, $value);
+ if ($url) {
+ $display = $url['file_url'];
+ }
+ }
+ // In other contexts show a paperclip icon
+ elseif ($value) {
$icons = CRM_Core_BAO_File::paperIconAttachment('*', $value);
$display = $icons[$value];
}