BUGFIX: Fixed CSV export generating file with duplicated headers

This commit is contained in:
Carlos Barberis 2010-04-26 22:55:52 +00:00
parent 826c6b5829
commit f9152b6108

View File

@ -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) {