Skip to content

Commit

Permalink
Fixed issue #09078: CSV export of particiapnt DB can make invalid CSV…
Browse files Browse the repository at this point in the history
… file

Dev: add the null attribute by empty string
  • Loading branch information
Shnoulle committed Jun 11, 2014
1 parent 637ac16 commit 653bfe6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/controllers/admin/participantsaction.php
Expand Up @@ -129,9 +129,10 @@ private function csvExport($search = null, $aAttributeIDs=null) {
}

$fieldKeys = array_flip($fields);
$fieldNeededKeys=array_fill_keys($outputarray[0], '');
foreach ($query as $field => $aData)
{
$outputarray[] = array_intersect_key($aData, $fieldKeys);
$outputarray[] = array_merge($fieldNeededKeys,array_intersect_key($aData, $fieldKeys));
}
CPDBExport($outputarray, "central_" . time());
}
Expand Down

0 comments on commit 653bfe6

Please sign in to comment.