| @@ 105-107 (lines=3) @@ | ||
| 102 | $csvPath = $this->container->get('application')->DocPath() . 'var/log/' . $file; |
|
| 103 | ||
| 104 | $outputBuffer = fopen($csvPath, 'w'); |
|
| 105 | foreach(array_merge(array(0 => $recordFields),$records) as $val) { |
|
| 106 | fputcsv($outputBuffer, $val, $this->container->get('config')->getByNamespace('WbmQueryManager', 'csv_field_separator')); |
|
| 107 | } |
|
| 108 | fclose($outputBuffer); |
|
| 109 | ||
| 110 | $mailRecipient = $this->container->get('config')->getByNamespace('WbmQueryManager', 'mail_address_receiver'); |
|
| @@ 223-225 (lines=3) @@ | ||
| 220 | header("Content-Disposition: attachment; filename=\"$file\""); |
|
| 221 | ||
| 222 | $outputBuffer = fopen("php://output", 'w'); |
|
| 223 | foreach(array_merge(array(0 => $recordFields),$records) as $val) { |
|
| 224 | fputcsv($outputBuffer, $val, $this->container->get('config')->getByNamespace('WbmQueryManager', 'csv_field_separator')); |
|
| 225 | } |
|
| 226 | fclose($outputBuffer); |
|
| 227 | ||
| 228 | exit(); |
|