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