BUGFIX Using current controller for MemberTableField constructor in Group->getCMSFields() instead of passing in a wrong instance (Group)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113273 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-11-01 01:28:52 +00:00 committed by Sam Minnee
parent e4d3584805
commit d6c9e18333

View File

@ -59,7 +59,7 @@ class Group extends DataObject {
new Tab('Members', _t('SecurityAdmin.MEMBERS', 'Members'), new Tab('Members', _t('SecurityAdmin.MEMBERS', 'Members'),
new TextField("Title", $this->fieldLabel('Title')), new TextField("Title", $this->fieldLabel('Title')),
$memberList = new MemberTableField( $memberList = new MemberTableField(
$this, (Controller::has_curr()) ? Controller::curr() : new Controller(),
"Members", "Members",
$this, $this,
null, null,
@ -144,7 +144,6 @@ class Group extends DataObject {
$rolesField->setDisabledItems($inheritedRoles->column('ID')); $rolesField->setDisabledItems($inheritedRoles->column('ID'));
} }
$memberList->setController($this);
$memberList->setPermissions(array('edit', 'delete', 'export', 'add', 'inlineadd')); $memberList->setPermissions(array('edit', 'delete', 'export', 'add', 'inlineadd'));
$memberList->setParentClass('Group'); $memberList->setParentClass('Group');
$memberList->setPopupCaption(_t('SecurityAdmin.VIEWUSER', 'View User')); $memberList->setPopupCaption(_t('SecurityAdmin.VIEWUSER', 'View User'));