From 14a0c154f5e168074493cf337c74d097759bf4d1 Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 11 Mar 2008 15:37:56 +0000 Subject: [PATCH] Removed warning messages and duplicate functions. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9684 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-server | 58 +++--------------------------------------- 1 file changed, 3 insertions(+), 55 deletions(-) diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 7a3783ee4..3243918fe 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -1714,42 +1714,6 @@ sub run_create_fai_release_db { return; } -sub get_fai_release_entries { - my $tmp_classes = shift || return; - my $parent = shift || undef; - my @result = shift || (); - - foreach my $entry (keys %{$tmp_classes}) { - if(defined($entry)) { - #daemon_log($entry,1); - if($entry =~ /^ou=.*$/) { - my $release_name = $entry; - $release_name =~ s/ou=//g; - if(defined($parent)) { - $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 get_fai_types { my $tmp_classes = shift || return undef; my @result; @@ -1961,23 +1925,6 @@ sub get_fai_release_entries { return @result; } -sub get_fai_types { - my $tmp_classes = shift || return undef; - my @result; - - foreach my $type(keys %{$tmp_classes}) { - if(defined($tmp_classes->{$type}[0]) && (!($tmp_classes->{$type}[0] =~ /^.*?removed.*?$/))) { - my $entry = { - type => $type, - state => $tmp_classes->{$type}[0], - }; - push @result, $entry; - } - } - - return @result; -} - sub deep_copy { my $this = shift; if (not ref $this) { @@ -2095,10 +2042,11 @@ sub parse_package { return; } - open($PACKAGES, "<$path.in") || sub { + open($PACKAGES, "<$path.in"); + if(defined($PACKAGES)) { daemon_log("ERROR: create_packages_list_db: parse_package: can not open '$path.in'",1); return; - }; + } # Read lines while (<$PACKAGES>){ -- 2.30.2