From: hickert Date: Wed, 23 Sep 2009 12:50:31 +0000 (+0000) Subject: Updated host and product handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d7827c677f08b2a63d9fb82abf9dc9861bd95d65;p=gosa.git Updated host and product handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14332 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 7dfa32139..b7c2ce5f9 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseByProduct.inc @@ -56,7 +56,7 @@ class licenseByProduct extends plugin }else{ $res = $this->si->getLicensesForProduct($this->cn); - if($this->si->is_error()){ + if($this->si->is_error() || !$res){ $this->init_successfull = FALSE; return; } diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc index 9b38d320a..a6ba92f37 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc @@ -56,7 +56,7 @@ class licenseUsageByHost extends plugin }else{ $res = $this->si->getLicenseUsage($this->cn); - if($this->si->is_error()){ + if($this->si->is_error() || !$res){ $this->init_successfull = FALSE; return; } diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc index 2fafdae3b..63e472935 100644 --- a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc +++ b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc @@ -304,10 +304,12 @@ class opsiLicenceHandler extends opsi { $data['productId'] = htmlentities($productId); $res = $this->send_data("gosa_opsi_getLicenseInformationForProduct",$this->target,$data,TRUE); - print_a($res); - + if(isset($res['XML'][0]['ERROR_OPSI_GETLICENSEINFORMATIONFORPRODUCT'])){ +# $this->set_error($res['XML'][0]['ERROR_OPSI_GETLICENSEINFORMATIONFORPRODUCT']); + return(FALSE); + } if(isset($res['XML'][0]['ANSWER_OPSI_UNASSIGNALLSOFTWARELICENSESFROMHOST'])){ - return(TRUE); + return($res['XML'][0]); } return(FALSE); }