diff --git a/includes/wf_crm_webform_base.inc b/includes/wf_crm_webform_base.inc index c8fc31309..5a6124e1a 100755 --- a/includes/wf_crm_webform_base.inc +++ b/includes/wf_crm_webform_base.inc @@ -948,11 +948,11 @@ abstract class wf_crm_webform_base { $entity_id = $this->ent[$entity][$n]['id']; } if (!empty($file[$val])) { - $fileHash = CRM_Core_BAO_File::generateFileHash($entity_id, $val); + $fileHash = is_callable(array('CRM_Core_BAO_File', 'generateFileHash')) ? '&fcs=' . CRM_Core_BAO_File::generateFileHash($entity_id, $val) : ''; return array( 'data_type' => 'File', 'name' => CRM_Utils_File::cleanFileName($file[$val]['uri']), - 'file_url'=> CRM_Utils_System::url('civicrm/file', "reset=1&id={$val}&eid={$entity_id}&fcs={$fileHash}", TRUE), + 'file_url'=> CRM_Utils_System::url('civicrm/file', "reset=1&id={$val}&eid={$entity_id}{$fileHash}", TRUE), 'icon' => file_icon_url((object) array('filemime' => $file[$val]['mime_type'])), ); }