mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
ae89c56d7a
commit
7f7e3a0ba3
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user