diff options
author | Udo Walter | 2017-12-19 16:32:48 +0100 |
---|---|---|
committer | Udo Walter | 2017-12-19 16:32:48 +0100 |
commit | cf4a22166311ac8b455b9e3bb1a6ba56529132ef (patch) | |
tree | 4d702b6417e4af8b0d1f9d89a9034280beff30b6 /modules-available/permissionmanager/inc/permissionutil.inc.php | |
parent | Fix A LOT of type problems, logic flaws, uninitialized variables etc. (diff) | |
download | slx-admin-cf4a22166311ac8b455b9e3bb1a6ba56529132ef.tar.gz slx-admin-cf4a22166311ac8b455b9e3bb1a6ba56529132ef.tar.xz slx-admin-cf4a22166311ac8b455b9e3bb1a6ba56529132ef.zip |
[permissionmanager] fixed small bug
Diffstat (limited to 'modules-available/permissionmanager/inc/permissionutil.inc.php')
-rw-r--r-- | modules-available/permissionmanager/inc/permissionutil.inc.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules-available/permissionmanager/inc/permissionutil.inc.php b/modules-available/permissionmanager/inc/permissionutil.inc.php index 6fc33ad1..cd7fb09a 100644 --- a/modules-available/permissionmanager/inc/permissionutil.inc.php +++ b/modules-available/permissionmanager/inc/permissionutil.inc.php @@ -75,7 +75,7 @@ class PermissionUtil preg_match('#^modules/([^/]+)/#', $file, $out); foreach( $data as $p ) { $description = Dictionary::translateFileModule($out[1], "permissions", $p); - $permissions = self::putInPermissionTree($out[1].".".$p, $description, $permissions); + self::putInPermissionTree($out[1].".".$p, $description, $permissions); } } ksort($permissions); @@ -89,10 +89,9 @@ class PermissionUtil return $permissions; } - private static function putInPermissionTree($permission, $description, $tree) + private static function putInPermissionTree($permission, $description, &$tree) { $subPermissions = explode('.', $permission); - $original =& $tree; foreach ($subPermissions as $subPermission) { if ($subPermission) { if (!array_key_exists($subPermission, $tree)) { @@ -101,6 +100,6 @@ class PermissionUtil $tree =& $tree[$subPermission]; } } - return $original; + $tree = $description; } }
\ No newline at end of file |