From fa04f03b0f5cc138f619f0adc5627618e4c80d7c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 23 Feb 2010 03:30:46 +0000 Subject: [PATCH] BUGFIX Setting ID explicitly in MemberTableField-> to ensure getCsvQuery() correctly filters (the custom group filter was only implemented in sourceItems() before) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@99684 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/MemberTableField.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/MemberTableField.php b/code/MemberTableField.php index 20d572fd..66c66929 100755 --- a/code/MemberTableField.php +++ b/code/MemberTableField.php @@ -101,6 +101,10 @@ class MemberTableField extends ComplexTableField { } $this->sourceFilter[] = '(' . implode(' OR ', $searchFilters) . ')'; } + + if($this->group) { + $this->sourceFilter[] = sprintf('"Group_Members"."GroupID" = %d', $this->group->ID); + } $this->sourceJoin = " INNER JOIN \"Group_Members\" ON \"MemberID\"=\"Member\".\"ID\""; $this->setFieldListCsv($csvFieldList);