mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #796 from stozze/3.0-bugfix
BUGFIX Fix to prevent unintended results from getComponentsQuery(...)
This commit is contained in:
commit
95dbad6195
@ -1359,7 +1359,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
|
|
||||||
// get filter
|
// get filter
|
||||||
$combinedFilter = "\"$joinField\" = '$id'";
|
$combinedFilter = "\"$joinField\" = '$id'";
|
||||||
if($filter) $combinedFilter .= " AND {$filter}";
|
if(!empty($filter)) $combinedFilter .= " AND ({$filter})";
|
||||||
|
|
||||||
return singleton($componentClass)->extendedSQL($combinedFilter, $sort, $limit, $join);
|
return singleton($componentClass)->extendedSQL($combinedFilter, $sort, $limit, $join);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user