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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@99706 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-23 04:43:25 +00:00
parent a9f8d553f4
commit 7e6dfe14f5

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\"";