From ad3aed79305e1445ffc7a38bfd358df7d46e29c4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 14 Sep 2007 19:40:56 +0000 Subject: [PATCH] mlanthaler: Bugfix: "if($className == null); $className = $this->stat('subitem_class');" had no effect because of the semicolon after the if-statement. (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41806 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/SecurityAdmin.php | 142 ++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/code/SecurityAdmin.php b/code/SecurityAdmin.php index aef8fab8..57f78d2a 100644 --- a/code/SecurityAdmin.php +++ b/code/SecurityAdmin.php @@ -12,7 +12,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { Requirements::javascript("jsparty/hover.js"); Requirements::javascript("jsparty/scriptaculous/controls.js"); - + // needed for MemberTableField (Requirements not determined before Ajax-Call) Requirements::javascript("sapphire/javascript/TableListField.js"); Requirements::javascript("sapphire/javascript/TableField.js"); @@ -20,11 +20,11 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { Requirements::javascript("cms/javascript/MemberTableField.js"); Requirements::css("jsparty/greybox/greybox.css"); Requirements::css("sapphire/css/ComplexTableField.css"); - + Requirements::javascript("cms/javascript/SecurityAdmin.js"); Requirements::javascript("cms/javascript/SecurityAdmin_left.js"); Requirements::javascript("cms/javascript/SecurityAdmin_right.js"); - + Requirements::javascript("jsparty/greybox/AmiJS.js"); Requirements::javascript("jsparty/greybox/greybox.js"); } @@ -38,14 +38,14 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { new TextField("Title", "Group name"), $memberList = new MemberTableField( $this, - "Members", + "Members", $record ) ), - + new Tab("Permissions", - new LiteralField("", "

This section is for advanced users only. - See this page + new LiteralField("", "

This section is for advanced users only. + See this page for more information.

"), new TableField( "Permissions", @@ -57,7 +57,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { ) ) ); - + if(!Permission::check('EDIT_PERMISSIONS')) $fields->removeFieldFromTab('Root', 'Permissions'); $memberList->setController($this); @@ -67,20 +67,20 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { $actions = new FieldSet( new FormAction('addmember','Add Member') ); - + $actions->push(new FormAction('save','Save')); - + $form = new Form($this, "EditForm", $fields, $actions); $form->loadDataFrom($record); return $form; } } - + public function AddRecordForm() { $m = new MemberTableField( $this, - "Members", + "Members", $this->currentPageID() ); return $m->AddRecordForm(); @@ -92,12 +92,12 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function autocomplete() { $fieldName = $this->urlParams['ID']; $fieldVal = $_REQUEST[$fieldName]; - + $matches = DataObject::get("Member","$fieldName LIKE '" . addslashes($fieldVal) . "%'"); if($matches) { $result .= "