Merge branch 'master' of gitlab.ow2.org:lemonldap-ng/lemonldap-ng

This commit is contained in:
Christophe Maudoux 2018-08-29 19:05:43 +02:00
commit c9f257ac96

View File

@ -105,6 +105,14 @@ sub addKey {
elsif ( $#path == 1 ) {
$new->{ $path[0] }->{ $path[1] }->{ $el->[1] } = $el->[2];
}
elsif ( $#path == 2 ) {
$new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $el->[1] } =
$el->[2];
}
elsif ( $#path == 3 ) {
$new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $path[3] }
->{ $el->[1] } = $el->[2];
}
else {
die $el->[0] . " has too many levels. Aborting";
}
@ -137,6 +145,13 @@ sub delKey {
elsif ( $#path == 1 ) {
delete $new->{ $path[0] }->{ $path[1] }->{ $el->[1] };
}
elsif ( $#path == 2 ) {
delete $new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $el->[1] };
}
elsif ( $#path == 3 ) {
delete $new->{ $path[0] }->{ $path[1] }->{ $path[2] }->{ $path[3] }
->{ $el->[1] };
}
else {
die $el->[0] . " has too many levels. Aborting";
}