API CHANGE: TableListField customQuery and customCsvQuery won't automatically include ID, ClassName, and RecordClassName fields (from r87354)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89726 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-10-21 02:36:33 +00:00
parent ae89c56d7a
commit 7f7e3a0ba3

View File

@ -472,9 +472,6 @@ 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\"";
} else {
$query = singleton($this->sourceClass)->extendedSQL($this->sourceFilter(), $this->sourceSort, null, $this->sourceJoin);
}
@ -493,16 +490,8 @@ JS
function getCsvQuery() {
$baseClass = ClassInfo::baseDataClass($this->sourceClass);
if($this->customCsvQuery) {
if($this->customCsvQuery || $this->customQuery) {
$query = $this->customCsvQuery;
$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\"";
} else {
$query = singleton($this->sourceClass)->extendedSQL($this->sourceFilter(), $this->sourceSort, null, $this->sourceJoin);
}