From c90bdec70c1bdab00d39dffa88bc009f3b885014 Mon Sep 17 00:00:00 2001 From: Jaap Jansma <jaap.jansma@civicoop.org> Date: Tue, 9 Apr 2019 18:09:21 +0200 Subject: [PATCH] update --- CRM/DataprocessorOutputExport/Page/Download.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/DataprocessorOutputExport/Page/Download.php b/CRM/DataprocessorOutputExport/Page/Download.php index fd0fd078..33a6a31d 100644 --- a/CRM/DataprocessorOutputExport/Page/Download.php +++ b/CRM/DataprocessorOutputExport/Page/Download.php @@ -28,7 +28,8 @@ class CRM_DataprocessorOutputExport_Page_Download extends CRM_Core_Page { CRM_Core_Error::statusBounce("Malformed filename"); } - list($prefix, $dataProcessorId, $outputId, $userId, $download_name) = explode("_", $fileName); + list($prefix, $dataProcessorId, $outputId, $userId, $download_name) = explode("_", $fileName, 5); + $download_name = $prefix.'_'.$download_name; $data_processors = CRM_Dataprocessor_BAO_DataProcessor::getValues(array('id' => $dataProcessorId)); $outputs = CRM_Dataprocessor_BAO_Output::getValues(array('id' => $outputId)); @@ -41,8 +42,6 @@ class CRM_DataprocessorOutputExport_Page_Download extends CRM_Core_Page { $path = CRM_Core_Config::singleton()->templateCompileDir . $directory. $fileName; $mimeType = $outputClass->mimeType(); - $ext = CRM_Utils_File::getFilesByExtension($path); - $download_name = $prefix.'_'.$download_name.'.'.$ext; if (!$path) { CRM_Core_Error::statusBounce('Could not retrieve the file'); -- GitLab