From 3f8a0ede40482e639f80dc5bc48b715373feea7a Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sun, 5 Dec 2010 08:24:12 +0000 Subject: [PATCH] BUGFIX Using current controller for MemberTableField constructor in Group->getCMSFields() instead of passing in a wrong instance (Group) (from r113273) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@114526 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Group.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/security/Group.php b/security/Group.php index 090c9a47a..6bc6834c3 100644 --- a/security/Group.php +++ b/security/Group.php @@ -59,7 +59,7 @@ class Group extends DataObject { new Tab('Members', _t('SecurityAdmin.MEMBERS', 'Members'), new TextField("Title", $this->fieldLabel('Title')), $memberList = new MemberTableField( - $this, + (Controller::has_curr()) ? Controller::curr() : new Controller(), "Members", $this, null, @@ -144,7 +144,6 @@ class Group extends DataObject { $rolesField->setDisabledItems($inheritedRoles->column('ID')); } - $memberList->setController($this); $memberList->setPermissions(array('edit', 'delete', 'export', 'add', 'inlineadd')); $memberList->setParentClass('Group'); $memberList->setPopupCaption(_t('SecurityAdmin.VIEWUSER', 'View User'));