From b198658c5011d5ac7f33e0322c1ff4ac7e07296c Mon Sep 17 00:00:00 2001 From: Pratik Joshi Date: Fri, 27 Sep 2013 13:02:30 +0530 Subject: [PATCH] CRM-13459 fix : added additional filter of entity_table = 'civicrm_pcp' ---------------------------------------- * CRM-13459: PCP Image does not display correct image http://issues.civicrm.org/jira/browse/CRM-13459 --- CRM/PCP/Page/PCPInfo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CRM/PCP/Page/PCPInfo.php b/CRM/PCP/Page/PCPInfo.php index 81ed047998..f26571ec56 100644 --- a/CRM/PCP/Page/PCPInfo.php +++ b/CRM/PCP/Page/PCPInfo.php @@ -194,9 +194,10 @@ class CRM_PCP_Page_PCPInfo extends CRM_Core_Page { $honor = CRM_PCP_BAO_PCP::honorRoll($this->_id); - if ($file_id = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_EntityFile', $this->_id, 'file_id', 'entity_id')) { + if ($fileInfo = reset(CRM_Core_BAO_File::getEntityFile('civicrm_pcp', $this->_id))) { + $fileId = $fileInfo['fileID']; $image = '_id}" + "reset=1&id=$fileId&eid={$this->_id}" ) . '" />'; $this->assign('image', $image); } -- 2.25.1