mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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() {
|
||||
$sourceFilter = parent::sourceFilter();
|
||||
|
||||
if($this->relationAutoSetting
|
||||
&& $this->getParentClass()
|
||||
&& ($filterKey = $this->getParentIdName($this->getParentClass(), $this->sourceClass()))
|
||||
&& ($filterValue = $this->sourceID()) ) {
|
||||
|
||||
$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;
|
||||
}
|
||||
return $sourceFilter;
|
||||
|
@ -926,7 +926,7 @@ JS
|
||||
}
|
||||
|
||||
}
|
||||
HTTP::sendFileToBrowser($fileData, $fileName);
|
||||
return HTTPRequest::send_file($fileData, $fileName);
|
||||
} else {
|
||||
user_error("No records found", E_USER_ERROR);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user