BUGFIX: Fix fatal error when exporting a csv from a tablefield with a custom query

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95108 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2009-12-14 03:40:43 +00:00 committed by Sam Minnee
parent d782c44269
commit f53a30f69c

View File

@ -491,10 +491,11 @@ JS
function getCsvQuery() {
$baseClass = ClassInfo::baseDataClass($this->sourceClass);
if($this->customCsvQuery || $this->customQuery) {
$query = $this->customCsvQuery;
$query = $this->customCsvQuery ? $this->customCsvQuery : $this->customQuery;
} else {
$query = singleton($this->sourceClass)->extendedSQL($this->sourceFilter(), $this->sourceSort, null, $this->sourceJoin);
}
return clone $query;
}