From: hickert Date: Tue, 29 Sep 2009 10:51:20 +0000 (+0000) Subject: Added lsiting of license usages X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f141a3761892922c8e84ea0d25b3d9a0753f5db2;p=gosa.git Added lsiting of license usages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14385 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc index 40c640aff..6d916a503 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc @@ -62,7 +62,13 @@ class licenseByProduct extends plugin return; } - $this->licenseUses = $res; + if(isset($res['USEDBY'])){ + foreach($res['USEDBY'] as $host){ + $data = $res; + $data['HOST'][0] = $host; + $this->licenseUses[] = $data; + } + } $this->init_successfull = TRUE; } } @@ -80,14 +86,12 @@ class licenseByProduct extends plugin // Create usage list $list = new divSelectBox("licenseUsage"); + foreach($this->licenseUses as $license){ - - $f1 = array("string" => $license['hostId'][0]); - $f2 = array("string" => $license['licenseKey'][0]); - $f3 = array("string" => $license['licensePoolId'][0]); - $f4 = array("string" => $license['softwareLicenseId'][0], - "attach" => "style='border-right:0px;'"); - $list->addEntry(array($f1,$f2,$f3,$f4)); + $f1 = array("string" => $license['HOST'][0]['VALUE']); + $f3 = array("string" => $license['LICENSEPOOLID'][0]['VALUE'], + "attach" => "style='border-right:0px;'"); + $list->addEntry(array($f1,$f3)); } $smarty = get_smarty();