BUG Fix CSV export with periods in the name

This commit is contained in:
Damian Mooyman 2015-08-28 16:21:51 +12:00
parent 4a37a17cdc
commit d1ad43e23f

View File

@ -162,7 +162,11 @@ LEFT JOIN "SubmittedForm" ON "SubmittedForm"."ID" = "SubmittedFormField"."Parent
WHERE "SubmittedForm"."ParentID" = '$parentID' WHERE "SubmittedForm"."ParentID" = '$parentID'
ORDER BY "Title" ASC ORDER BY "Title" ASC
SQL; 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 = new GridFieldConfig();
$config->addComponent(new GridFieldToolbarHeader()); $config->addComponent(new GridFieldToolbarHeader());