From 6b48e510e58c63f4fdea7fc88d83e07473ad665e Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 26 Jun 2008 07:54:25 +0000 Subject: [PATCH] Added getProductProperties git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11447 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/client/events/opsi.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gosa-si/client/events/opsi.pm b/gosa-si/client/events/opsi.pm index fad02ea3f..f8aa012a9 100644 --- a/gosa-si/client/events/opsi.pm +++ b/gosa-si/client/events/opsi.pm @@ -153,6 +153,7 @@ sub opsi_get_product_properties { if (defined $forward_to_gosa) { &add_content2xml_hash($out_hash, "forward_to_gosa", $forward_to_gosa); } + &add_content2xml_hash($out_hash, "ProducId", "$productId"); &add_content2xml_hash($out_hash, "xxx", ""); my $xml_msg= &create_xml_string($out_hash); @@ -166,15 +167,17 @@ sub opsi_get_product_properties { my $res = $client->call($opsi_url, $callobj); if (check_res($res)){ - my $item= "$productId"; - print STDERR Dumper($res->result); foreach my $r (@{$res->result}) { - -This is not correct.... - $item= "$productId"; + my $item= ""; foreach my $key (keys %{$r}) { my $value = $r->{$key}; - $item.= "<$key>$value"; + if (UNIVERSAL::isa( $value, "ARRAY" )){ + foreach my $subval (@{$value}){ + $item.= "<$key>$subval"; + } + } else { + $item.= "<$key>$value"; + } } $item.= ""; $xml_msg=~ s/<\/xxx>/$item<\/xxx>/; -- 2.30.2