From 57924a2c95570b6cdc7029a09acb5c5ba53e475d Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 31 Oct 2009 00:58:16 +0000 Subject: [PATCH] BUGFIX: Fixed glitch in permission code formats. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90550 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Permission.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/security/Permission.php b/security/Permission.php index 7f37e050d..ce9f1e7af 100755 --- a/security/Permission.php +++ b/security/Permission.php @@ -501,12 +501,12 @@ class Permission extends DataObject { foreach($someCodes as $k => $v) { if (is_array($v)) { // There must be a category and name key. - if (!isset($v[Two])) user_error("The permission $k must have a category key", E_USER_WARNING); + if (!isset($v['category'])) user_error("The permission $k must have a category key", E_USER_WARNING); if (!isset($v['name'])) user_error("The permission $k must have a name key", E_USER_WARNING); - if (!isset($allCodes[$v[Two]])) $allCodes[$v[Two]] = array(); + if (!isset($allCodes[$v['category']])) $allCodes[$v['category']] = array(); - $allCodes[$v[Two]][$k] = array( + $allCodes[$v['category']][$k] = array( 'name' => $v['name'], 'help' => isset($v['help']) ? $v['help'] : null, 'sort' => isset($v['sort']) ? $v['sort'] : 0