Skip to content
Snippets Groups Projects
Commit 3a64b97a authored by jaapjansma's avatar jaapjansma
Browse files

Fixed issue with CSV and PDF Download output.

parent 2f28873e
No related branches found
No related tags found
No related merge requests found
# Version 1.30 (not yet released)
# Version 1.30
* Fixed issue with relative date and required filters.
* Compatibility with php 7.0
* Activity search with empty id.
* Fixed issue with aggregation on date fields #78
* Fixed issue with CSV and PDF Download output.
# Version 1.29
......
......@@ -155,7 +155,7 @@ class CRM_DataprocessorOutputExport_CSV implements ExportOutputInterface, Direct
}
}
public function doDirectDownload(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName = null, $sortDirection = 'ASC', $idField, $selectedIds=array()) {
public function doDirectDownload(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName = null, $sortDirection = 'ASC', $idField=null, $selectedIds=array()) {
$filename = date('Ymdhis').'_'.$dataProcessor['id'].'_'.$outputBAO['id'].'_'.CRM_Core_Session::getLoggedInContactID().'_'.$dataProcessor['name'].'.csv';
$download_name = date('Ymdhis').'_'.$dataProcessor['name'].'.csv';
......@@ -183,6 +183,7 @@ class CRM_DataprocessorOutputExport_CSV implements ExportOutputInterface, Direct
\CRM_Core_Error::statusBounce('The file is either empty or you do not have permission to retrieve the file');
}
CRM_Utils_System::setHttpHeader('Access-Control-Allow-Origin', '*');
\CRM_Utils_System::download(
$download_name,
$mimeType,
......
......@@ -258,7 +258,7 @@ class CRM_DataprocessorOutputExport_PDF implements ExportOutputInterface, Direct
}
}
public function doDirectDownload(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName = null, $sortDirection = 'ASC', $idField, $selectedIds=array()) {
public function doDirectDownload(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName = null, $sortDirection = 'ASC', $idField=null, $selectedIds=array()) {
$filename = date('Ymdhis').'_'.$dataProcessor['id'].'_'.$outputBAO['id'].'_'.CRM_Core_Session::getLoggedInContactID().'_'.$dataProcessor['name'].'.html';
$download_name = date('Ymdhis').'_'.$dataProcessor['name'].'.pdf';
......@@ -286,6 +286,7 @@ class CRM_DataprocessorOutputExport_PDF implements ExportOutputInterface, Direct
\CRM_Core_Error::statusBounce('The file is either empty or you do not have permission to retrieve the file');
}
CRM_Utils_System::setHttpHeader('Access-Control-Allow-Origin', '*');
\CRM_Utils_System::download(
$download_name,
$mimeType,
......
......@@ -52,6 +52,7 @@ class CRM_DataprocessorOutputExport_Page_Download extends CRM_Core_Page {
CRM_Core_Error::statusBounce('The file is either empty or you do not have permission to retrieve the file');
}
CRM_Utils_System::setHttpHeader('Access-Control-Allow-Origin', '*');
CRM_Utils_System::download(
$download_name,
$mimeType,
......
......@@ -28,6 +28,6 @@ interface DirectDownloadExportOutputInterface extends UrlOutputInterface {
* Array with the selectedIds.
* @return string
*/
public function doDirectDownload(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName = null, $sortDirection = 'ASC', $idField, $selectedIds=array());
public function doDirectDownload(\Civi\DataProcessor\ProcessorType\AbstractProcessorType $dataProcessorClass, $dataProcessor, $outputBAO, $sortFieldName = null, $sortDirection = 'ASC', $idField=null, $selectedIds=array());
}
......@@ -14,8 +14,8 @@
<url desc="Documentation">https://lab.civicrm.org/extensions/dataprocessor/blob/master/README.md</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2021-01-15</releaseDate>
<version>1.30-dev</version>
<releaseDate>2021-02-03</releaseDate>
<version>1.30</version>
<develStage>stable</develStage>
<compatibility>
<ver>4.7</ver>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment