summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 260838a)
raw | patch | inline | side by side (parent: 260838a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 28 Sep 2009 09:21:57 +0000 (09:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 28 Sep 2009 09:21:57 +0000 (09:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14363 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc | patch | blob | history |
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc
index 077b02e4227f8161b5ff77313e7979135e765528..7efb01c4b29f9ca7ba08149fc492f3c9bcb27bc7 100644 (file)
if(isset($res['XML'][0]['ANSWER_OPSI_GETRESERVEDLICENSES'])){
$items = array();
- foreach($res['XML'][0]['LICENSES'][0]['HIT'] as $entry){
- $item = array();
- foreach(array(
- "LICENSEPOOLIDS" => "licensePoolId",
- "SOFTWARELICENSEID" => "softwareLicenseId") as $source => $target){
- if(isset($entry[$source])){
-
- $item[$target] = array('count' => 0);
- foreach($entry[$source] as $data){
- $item[$target][] = $data['VALUE'];
+ if(isset($res['XML'][0]['LICENSES'][0]['HIT'])){
+ foreach($res['XML'][0]['LICENSES'][0]['HIT'] as $entry){
+ $item = array();
+ foreach(array(
+ "LICENSEPOOLIDS" => "licensePoolId",
+ "SOFTWARELICENSEID" => "softwareLicenseId") as $source => $target){
+ if(isset($entry[$source])){
+
+ $item[$target] = array('count' => 0);
+ foreach($entry[$source] as $data){
+ $item[$target][] = $data['VALUE'];
+ }
+ $item[$target]['count'] = count($item[$target]) -1 ;
}
- $item[$target]['count'] = count($item[$target]) -1 ;
}
+ $items[] = $item;
}
- $items[] = $item;
}
return($items);
}
if(isset($res['XML'][0]['ANSWER_OPSI_GETSOFTWARELICENSEUSAGES'])){
$items = array();
- foreach($res['XML'][0]['RESULT'][0]['HIT'] as $entry){
- $item = array();
- foreach(array(
- "HOSTID" => "hostId",
- "LICENSEKEY" => "licenseKey",
- "LICENSEPOOLID" => "licensePoolId",
- "NOTES" => "notes",
- "SOFTWARELICENSEID" => "softwareLicenseId") as $source => $target){
- if(isset($entry[$source])){
-
- $item[$target] = array('count' => 0);
- foreach($entry[$source] as $data){
- $item[$target][] = $data['VALUE'];
+ if(isset($res['XML'][0]['RESULT'][0]['HIT'])){
+ foreach($res['XML'][0]['RESULT'][0]['HIT'] as $entry){
+ $item = array();
+ foreach(array(
+ "HOSTID" => "hostId",
+ "LICENSEKEY" => "licenseKey",
+ "LICENSEPOOLID" => "licensePoolId",
+ "NOTES" => "notes",
+ "SOFTWARELICENSEID" => "softwareLicenseId") as $source => $target){
+ if(isset($entry[$source])){
+
+ $item[$target] = array('count' => 0);
+ foreach($entry[$source] as $data){
+ $item[$target][] = $data['VALUE'];
+ }
+ $item[$target]['count'] = count($item[$target]) -1 ;
}
- $item[$target]['count'] = count($item[$target]) -1 ;
}
+ $items[] = $item;
}
- $items[] = $item;
}
return($items);
}