From 216f661147db11298aed1872fae08bc868586d41 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Tue, 11 Sep 2018 15:41:01 +0530 Subject: [PATCH] dev/core#381 - Clear session vars while retriving the files with id and eid --- modules/views/civicrm/civicrm_handler_field_file.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/views/civicrm/civicrm_handler_field_file.inc b/modules/views/civicrm/civicrm_handler_field_file.inc index 23126c84a..36cc32dff 100644 --- a/modules/views/civicrm/civicrm_handler_field_file.inc +++ b/modules/views/civicrm/civicrm_handler_field_file.inc @@ -61,6 +61,11 @@ class civicrm_handler_field_custom_file extends views_handler_field { $path = sprintf('%s/imagefile', $path); } + //Reset session params as we send only id and eid to retrieve the file. + $file = new CRM_Core_Page_File(); + $file->set('filename', NULL); + $file->set('mime-type', NULL); + $entityField = $this->aliases['entity_id']; $url = CRM_Utils_System::url($path, "id={$value}&eid={$values->$entityField}",