From 7e23557740b9c892a63692489df58787d3f1d04f Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 11 Mar 2008 15:53:00 +0000 Subject: [PATCH] Added function (svn sync of death). git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9686 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index dfa840aa8..fdcb31b36 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1890,6 +1890,40 @@ sub apply_fai_inheritance { return $fai_classes; } +sub get_fai_release_entries { + my $tmp_classes = shift || return; + my $parent = shift || ""; + my @result = shift || (); + + foreach my $entry (keys %{$tmp_classes}) { + if(defined($entry)) { + if($entry =~ /^ou=.*$/) { + my $release_name = $entry; + $release_name =~ s/ou=//g; + if(length($parent)>0) { + $release_name = $parent."/".$release_name; + } + my @bufentries = get_fai_release_entries($tmp_classes->{$entry}, $release_name, @result); + foreach my $bufentry(@bufentries) { + push @result, $bufentry; + } + } else { + my @types = get_fai_types($tmp_classes->{$entry}); + foreach my $type (@types) { + push @result, + { + 'class' => $entry, + 'type' => $type->{'type'}, + 'release' => $parent, + 'state' => $type->{'state'}, + }; + } + } + } + } + + return @result; +} sub deep_copy { my $this = shift; -- 2.30.2