Skip to content

Commit

Permalink
Merge pull request #323 from tractorcow/pulls/3.0/fix-export
Browse files Browse the repository at this point in the history
BUG Fix CSV export with periods in the name
  • Loading branch information
assertchris committed Aug 30, 2015
2 parents 4a37a17 + d1ad43e commit fc49f6b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion code/model/UserDefinedForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ public function getCMSFields() {
WHERE "SubmittedForm"."ParentID" = '$parentID'
ORDER BY "Title" ASC
SQL;
$columns = DB::query($columnSQL)->map();
// Sanitise periods in title
$columns = array();
foreach(DB::query($columnSQL)->map() as $name => $title) {
$columns[$name] = trim(strtr($title, '.', ' '));
}

$config = new GridFieldConfig();
$config->addComponent(new GridFieldToolbarHeader());
Expand Down

0 comments on commit fc49f6b

Please sign in to comment.