MINOR FIX: columns quoted properly

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86528 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2009-09-17 00:18:43 +00:00
parent e4005468f7
commit 69563972e5

View File

@ -460,9 +460,9 @@ JS
if($this->customQuery) {
$query = clone $this->customQuery;
$baseClass = ClassInfo::baseDataClass($this->sourceClass);
$query->select[] = "{$baseClass}.ID AS \"ID\"";
$query->select[] = "{$baseClass}.ClassName AS \"ClassName\"";
$query->select[] = "{$baseClass}.ClassName AS \"RecordClassName\"";
$query->select[] = "\"{$baseClass}\".\"ID\" AS \"ID\"";
$query->select[] = "\"{$baseClass}\".\"ClassName\" AS \"ClassName\"";
$query->select[] = "\"{$baseClass}\".\"ClassName\" AS \"RecordClassName\"";
} else {
$query = singleton($this->sourceClass)->extendedSQL($this->sourceFilter(), $this->sourceSort, null, $this->sourceJoin);
}
@ -483,14 +483,14 @@ JS
$baseClass = ClassInfo::baseDataClass($this->sourceClass);
if($this->customCsvQuery) {
$query = $this->customCsvQuery;
$query->select[] = "{$baseClass}.ID AS ID";
$query->select[] = "{$baseClass}.ClassName AS ClassName";
$query->select[] = "{$baseClass}.ClassName AS \"RecordClassName\"";
$query->select[] = "\"{$baseClass}\".\"ID\" AS \"ID\"";
$query->select[] = "\"{$baseClass}\".\"ClassName\" AS \"ClassName\"";
$query->select[] = "\"{$baseClass}\".\"ClassName\" AS \"RecordClassName\"";
} else if($this->customQuery) {
$query = $this->customQuery;
$query->select[] = "{$baseClass}.ID AS ID";
$query->select[] = "{$baseClass}.ClassName AS ClassName";
$query->select[] = "{$baseClass}.ClassName AS \"RecordClassName\"";
$query->select[] = "\"{$baseClass}\".\"ID\" AS \"ID\"";
$query->select[] = "\"{$baseClass}\".\"ClassName\" AS \"ClassName\"";
$query->select[] = "\"{$baseClass}\".\"ClassName\" AS \"RecordClassName\"";
} else {
$query = singleton($this->sourceClass)->extendedSQL($this->sourceFilter(), $this->sourceSort, null, $this->sourceJoin);
}