BUGFIX Fixed MemberTableField limiting of , wasnt taking children groups into account (regression from r99684) (from r99706)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@99713 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-23 04:57:37 +00:00 committed by Sam Minnee
parent 9a5b429ad1
commit f088acf5e3

View File

@ -103,7 +103,10 @@ class MemberTableField extends ComplexTableField {
}
if($this->group) {
$this->sourceFilter[] = sprintf('"Group_Members"."GroupID" = %d', $this->group->ID);
$this->sourceFilter[] = sprintf(
'"Group_Members"."GroupID" IN (%s)',
implode(',', array_merge($this->group->AllChildren()->column('ID'), array($this->group->ID)))
);
}
$this->sourceJoin = " INNER JOIN \"Group_Members\" ON \"MemberID\"=\"Member\".\"ID\"";