mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUGFIX: Fixed CSV export generating file with duplicated headers
This commit is contained in:
parent
826c6b5829
commit
f9152b6108
@ -93,8 +93,13 @@ class SubmittedFormReportField extends FormField {
|
|||||||
foreach($tmp as $array) {
|
foreach($tmp as $array) {
|
||||||
$csvHeaderNames[] = $array['Name'];
|
$csvHeaderNames[] = $array['Name'];
|
||||||
$csvHeaderTitle[] = $array['Title'];
|
$csvHeaderTitle[] = $array['Title'];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// We need Headers to be unique, query is returning headers multiple times (number of submissions).
|
||||||
|
// TODO: Fix query
|
||||||
|
$csvHeaderNames = array_unique($csvHeaderNames);
|
||||||
|
$csvHeaderTitle = array_unique($csvHeaderTitle);
|
||||||
|
|
||||||
// For every submission...
|
// For every submission...
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($submissions as $submission) {
|
foreach($submissions as $submission) {
|
||||||
|
Loading…
Reference in New Issue
Block a user