Skip to content

Commit

Permalink
Merge pull request #797 from stozze/2.4-bugfix
Browse files Browse the repository at this point in the history
BUGFIX Fix to prevent unintended results from getComponentsQuery(...)
  • Loading branch information
chillu committed Sep 18, 2012
2 parents 33b9b18 + 8ec6312 commit 201fb48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/model/DataObject.php
Expand Up @@ -1307,7 +1307,7 @@ public function getComponentsQuery($componentName, $filter = "", $sort = "", $jo

// get filter
$combinedFilter = "\"$joinField\" = '$id'";
if($filter) $combinedFilter .= " AND {$filter}";
if(!empty($filter)) $combinedFilter .= " AND ({$filter})";

return singleton($componentClass)->extendedSQL($combinedFilter, $sort, $limit, $join);
}
Expand Down

0 comments on commit 201fb48

Please sign in to comment.