projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix batch transaction export on D8/9
[civicrm-core.git]
/
CRM
/
Batch
/
BAO
/
Batch.php
diff --git
a/CRM/Batch/BAO/Batch.php
b/CRM/Batch/BAO/Batch.php
index f44c0e4999485fcd03a7a35621bd2bd1ba4e9a9c..1f420a0c57787e8db840b464b0c7390d2300284a 100644
(file)
--- a/
CRM/Batch/BAO/Batch.php
+++ b/
CRM/Batch/BAO/Batch.php
@@
-450,8
+450,8
@@
class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
'export' => [
'name' => ts('Export'),
'title' => ts('Export Batch'),
'export' => [
'name' => ts('Export'),
'title' => ts('Export Batch'),
- 'url' => '
#
',
- '
extra' => 'rel="export"
',
+ 'url' => '
civicrm/financial/batch/export
',
+ '
qs' => 'reset=1&id=%%id%%&status=1
',
],
'reopen' => [
'name' => ts('Re-open'),
],
'reopen' => [
'name' => ts('Re-open'),
@@
-579,12
+579,10
@@
class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
*/
public static function exportFinancialBatch($batchIds, $exportFormat, $downloadFile) {
if (empty($batchIds)) {
*/
public static function exportFinancialBatch($batchIds, $exportFormat, $downloadFile) {
if (empty($batchIds)) {
- CRM_Core_Error::fatal(ts('No batches were selected.'));
- return;
+ throw new CRM_Core_Exception(ts('No batches were selected.'));
}
if (empty($exportFormat)) {
}
if (empty($exportFormat)) {
- CRM_Core_Error::fatal(ts('No export format selected.'));
- return;
+ throw new CRM_Core_Exception(ts('No export format selected.'));
}
self::$_exportFormat = $exportFormat;
}
self::$_exportFormat = $exportFormat;
@@
-594,7
+592,7
@@
class CRM_Batch_BAO_Batch extends CRM_Batch_DAO_Batch {
$exporter = new $exporterClass();
}
else {
$exporter = new $exporterClass();
}
else {
-
CRM_Core_Error::fatal
("Could not locate exporter: $exporterClass");
+
throw new CRM_Core_Exception
("Could not locate exporter: $exporterClass");
}
$export = [];
$exporter->_isDownloadFile = $downloadFile;
}
$export = [];
$exporter->_isDownloadFile = $downloadFile;