summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7a39c1)
raw | patch | inline | side by side (parent: c7a39c1)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 07:54:25 +0000 (07:54 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 07:54:25 +0000 (07:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11447 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/client/events/opsi.pm | patch | blob | history |
index fad02ea3ffb1cbe4c78befc583d94ad9092a8ae3..f8aa012a9ef3f0c92b6ef56e655678fcf533a7a8 100644 (file)
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);
my $res = $client->call($opsi_url, $callobj);
if (check_res($res)){
- my $item= "<item><ProductId>$productId</productId>";
- print STDERR Dumper($res->result);
foreach my $r (@{$res->result}) {
-
-This is not correct....
- $item= "<item><ProductId>$productId</productId>";
+ my $item= "<item>";
foreach my $key (keys %{$r}) {
my $value = $r->{$key};
- $item.= "<$key>$value</$key>";
+ if (UNIVERSAL::isa( $value, "ARRAY" )){
+ foreach my $subval (@{$value}){
+ $item.= "<$key>$subval</$key>";
+ }
+ } else {
+ $item.= "<$key>$value</$key>";
+ }
}
$item.= "</item>";
$xml_msg=~ s/<xxx><\/xxx>/$item<xxx><\/xxx>/;