| @@ 200-202 (lines=3) @@ | ||
| 197 | header("Content-Disposition: attachment; filename=\"$file\""); |
|
| 198 | ||
| 199 | $outputBuffer = fopen("php://output", 'w'); |
|
| 200 | foreach(array_merge(array(0 => $recordFields),$records) as $val) { |
|
| 201 | fputcsv($outputBuffer, $val, $this->container->get('config')->getByNamespace('WbmQueryManager', 'csv_field_separator')); |
|
| 202 | } |
|
| 203 | fclose($outputBuffer); |
|
| 204 | ||
| 205 | exit(); |
|
| @@ 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'); |
|