mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX: Fixed ComplexTableField export
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63581 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d0ba21a12f
commit
7fbeb7d6c5
@ -187,12 +187,19 @@ class ComplexTableField extends TableListField {
|
|||||||
*/
|
*/
|
||||||
function sourceFilter() {
|
function sourceFilter() {
|
||||||
$sourceFilter = parent::sourceFilter();
|
$sourceFilter = parent::sourceFilter();
|
||||||
|
|
||||||
if($this->relationAutoSetting
|
if($this->relationAutoSetting
|
||||||
&& $this->getParentClass()
|
&& $this->getParentClass()
|
||||||
&& ($filterKey = $this->getParentIdName($this->getParentClass(), $this->sourceClass()))
|
&& ($filterKey = $this->getParentIdName($this->getParentClass(), $this->sourceClass()))
|
||||||
&& ($filterValue = $this->sourceID()) ) {
|
&& ($filterValue = $this->sourceID()) ) {
|
||||||
|
|
||||||
$newFilter = "`$filterKey` = '" . Convert::raw2sql($filterValue) . "'";
|
$newFilter = "`$filterKey` = '" . Convert::raw2sql($filterValue) . "'";
|
||||||
|
|
||||||
|
if($sourceFilter && is_array($sourceFilter)) {
|
||||||
|
// Note that the brackets below are taken into account when building this
|
||||||
|
$sourceFilter = implode(") AND (", $sourceFilter);
|
||||||
|
}
|
||||||
|
|
||||||
$sourceFilter = $sourceFilter ? "($sourceFilter) AND ($newFilter)" : $newFilter;
|
$sourceFilter = $sourceFilter ? "($sourceFilter) AND ($newFilter)" : $newFilter;
|
||||||
}
|
}
|
||||||
return $sourceFilter;
|
return $sourceFilter;
|
||||||
|
@ -926,7 +926,7 @@ JS
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
HTTP::sendFileToBrowser($fileData, $fileName);
|
return HTTPRequest::send_file($fileData, $fileName);
|
||||||
} else {
|
} else {
|
||||||
user_error("No records found", E_USER_ERROR);
|
user_error("No records found", E_USER_ERROR);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user