From 008ecf750a2e0c7fc707a2487dc5f9ac0df24e9b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 30 Jan 2012 17:29:35 +0100 Subject: [PATCH] MINOR Fixed GridFieldExporter accessors (undefined $gridField in changed scope) --- forms/gridfield/GridFieldExporter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/forms/gridfield/GridFieldExporter.php b/forms/gridfield/GridFieldExporter.php index 7dd6a7328..c3d26e598 100644 --- a/forms/gridfield/GridFieldExporter.php +++ b/forms/gridfield/GridFieldExporter.php @@ -90,7 +90,7 @@ class GridFieldExporter implements GridField_HTMLProvider, GridField_ActionProvi */ 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 @@ class GridFieldExporter implements GridField_HTMLProvider, GridField_ActionProvi } /** - * Returns exported columns, defaults to {@link GridField->getDisplayFields()}. - * * @return array */ function getExportColumns() { - return ($this->exportColumns) ? $this->exportColumns : $gridField->getDisplayFields(); + return $this->exportColumns; } /**