Skip to content

Commit

Permalink
BUGFIX Setting ID explicitly in MemberTableField-> to ensure getCsvQu…
Browse files Browse the repository at this point in the history
…ery() 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
  • Loading branch information
chillu committed Feb 23, 2010
1 parent ae844c5 commit fa04f03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/MemberTableField.php
Expand Up @@ -101,6 +101,10 @@ function __construct($controller, $name, $group = null, $members = null, $hidePa
} }
$this->sourceFilter[] = '(' . implode(' OR ', $searchFilters) . ')'; $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->sourceJoin = " INNER JOIN \"Group_Members\" ON \"MemberID\"=\"Member\".\"ID\"";
$this->setFieldListCsv($csvFieldList); $this->setFieldListCsv($csvFieldList);
Expand Down

0 comments on commit fa04f03

Please sign in to comment.