Permalink
Browse files

MINOR Fixed GridFieldExporter accessors (undefined $gridField in chan…

…ged scope)
  • Loading branch information...
chillu committed Jan 30, 2012
1 parent 5faca9c commit 008ecf750a2e0c7fc707a2487dc5f9ac0df24e9b
Showing with 2 additions and 4 deletions.
  1. +2 −4 forms/gridfield/GridFieldExporter.php
@@ -90,7 +90,7 @@ public function handleExport($gridField, $request = null) {
*/
function generateExportFileData($gridField) {
$separator = $this->csvSeparator;
- $csvColumns = $this->getExportColumns();
+ $csvColumns = ($this->exportColumns) ? $this->exportColumns : $gridField->getDisplayFields();
$fileData = '';
$columnData = array();
$fieldItems = new ArrayList();
@@ -118,12 +118,10 @@ function generateExportFileData($gridField) {
}
/**
- * Returns exported columns, defaults to {@link GridField->getDisplayFields()}.
- *
* @return array
*/
function getExportColumns() {
- return ($this->exportColumns) ? $this->exportColumns : $gridField->getDisplayFields();
+ return $this->exportColumns;
}
/**

0 comments on commit 008ecf7

Please sign in to comment.