From: janw Date: Tue, 15 Apr 2008 06:49:20 +0000 (+0000) Subject: Changed query object from server to release. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=edfdabdffc34d1dd6105c53cc8818bfc4aa49639;p=gosa.git Changed query object from server to release. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10444 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/server/events/gosaTriggered.pm b/gosa-si/server/events/gosaTriggered.pm index 0d4861e58..29e1a7b9e 100644 --- a/gosa-si/server/events/gosaTriggered.pm +++ b/gosa-si/server/events/gosaTriggered.pm @@ -649,20 +649,14 @@ sub get_available_kernel { my $source = @{$msg_hash->{'source'}}[0]; my $target = @{$msg_hash->{'target'}}[0]; - my $server = @{$msg_hash->{'server'}}[0]; - - # Get available Releases for server - my $sql_statement = "SELECT * FROM $main::fai_server_tn WHERE server LIKE '%$server%'"; - my $res_hash = $main::fai_server_db->select_dbentry($sql_statement); + my $release= @{$msg_hash->{'release'}}[0]; my @kernel; - foreach my $release (keys %{$res_hash}) { - # Get Kernel packages for release - my $sql_statement = "SELECT * FROM $main::packages_list_tn WHERE distribution='".$res_hash->{$release}->{'release'}."' AND package LIKE 'linux\-image\-%'"; - my $hash = $main::packages_list_db->select_dbentry($sql_statement); - foreach my $package (keys %{$hash}) { - push @kernel, (%{$res_hash}->{$release}->{'release'})."|".(%{$hash}->{$package}->{'package'}); - } + # Get Kernel packages for release + my $sql_statement = "SELECT * FROM $main::packages_list_tn WHERE distribution='$release' AND package LIKE 'linux\-image\-%'"; + my $res_hash = $main::packages_list_db->select_dbentry($sql_statement); + foreach my $package (keys %{$res_hash}) { + push @kernel, %{$res_hash}->{$package}->{'package'}; } my %data = ('available-kernel' => \@kernel); @@ -671,4 +665,5 @@ sub get_available_kernel { return ( $out_msg ); } + 1;