summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2062edb)
raw | patch | inline | side by side (parent: 2062edb)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 29 Oct 2008 15:52:45 +0000 (15:52 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 29 Oct 2008 15:52:45 +0000 (15:52 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12809 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_userinfo.inc | patch | blob | history |
index 0483ef2e61438ea7e7aea9b7a54a32fbad579545..62ca552772a1bfc303a952bb3d6abde2a2c27bfc 100644 (file)
function cleanACL($acl, $reset= FALSE)
{
- foreach ($acl as &$value){
+ foreach ($acl as $key => $value){
+
+ /* Continue, if value is empty or permanent */
+ if ($value == "" || $value == "p") {
+ continue;
+ }
/* Reset removes everything but 'p' */
if ($reset && $value != 'p'){
- $value= "";
+ $acl[$key]= "";
continue;
}
/* Decrease tree level */
if (is_int($value)){
if ($value){
- $value--;
+ $acl[$key]--;
} else {
- $value= "";
+ $acl[$key]= "";
}
}
}