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
This commit is contained in:
Sam Minnee 2009-10-31 00:58:16 +00:00
parent 50831cba9a
commit 57924a2c95

View File

@ -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