Skip to content

Commit

Permalink
ENHANCEMENT GridFieldExportButton now supports dot syntax for column …
Browse files Browse the repository at this point in the history
…sources through DataObject::relField()
  • Loading branch information
halkyon committed Mar 25, 2012
1 parent 92b6adf commit 4bcd44a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions forms/gridfield/GridFieldExportButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function generateExportFileData($gridField) {
foreach($items as $item) {
$columnData = array();
foreach($csvColumns as $columnSource => $columnHeader) {
$value = $item->$columnSource;
$value = $item->relField($columnSource);
$value = str_replace(array("\r", "\n"), "\n", $value);
$columnData[] = '"' . str_replace('"', '\"', $value) . '"';
}
Expand Down Expand Up @@ -172,4 +172,4 @@ function setCsvHasHeader($bool) {
}


}
}

0 comments on commit 4bcd44a

Please sign in to comment.