From 387bc4f78663623c2098e75c6bc9d6adda41cfe6 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Mon, 30 Jan 2017 17:58:45 -0500 Subject: [PATCH 1/2] CRM-19947 fix file link on custom multi profile edit form --- CRM/Profile/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 9bcf0b9ee75..e513affbaa7 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -500,7 +500,7 @@ public function setDefaultsValues() { ) { $entityId = $this->_activityId; } - $url = CRM_Core_BAO_CustomField::getFileURL($entityId, $key); + $url = CRM_Core_BAO_CustomField::getFileURL($entityId, $key, $value); if ($url) { $customFiles[$name]['displayURL'] = ts("Attached File") . ": {$url['file_url']}"; From f8ebcb30704bb8018a24b8722af3055a62914d12 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Thu, 2 Feb 2017 09:28:33 -0500 Subject: [PATCH 2/2] CRM-19947 adjust url condition --- CRM/Profile/Form.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index e513affbaa7..d6abda6e3d5 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -500,7 +500,11 @@ public function setDefaultsValues() { ) { $entityId = $this->_activityId; } - $url = CRM_Core_BAO_CustomField::getFileURL($entityId, $key, $value); + + $url = ''; + if (isset($value)) { + $url = CRM_Core_BAO_CustomField::getFileURL($entityId, $key, $value); + } if ($url) { $customFiles[$name]['displayURL'] = ts("Attached File") . ": {$url['file_url']}";