summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 573089f)
raw | patch | inline | side by side (parent: 573089f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Sep 2009 12:14:13 +0000 (12:14 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Sep 2009 12:14:13 +0000 (12:14 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14331 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 f54b036a4c50702c256c8b879b28f1698180d66c..7dfa32139c03e9ed9757a9fa7e0f219009102ce7 100644 (file)
var $init_successfull = FALSE;
- function __construct(&$config,$dn)
+ function __construct(&$config,$dn,$a,$b)
{
$this->config = $config;
$this->dn = $this->orig_dn = $dn;
$this->init_successfull = TRUE;
}else{
- $res = $this->si->getLicenseUsage("", $this->cn);
+ $res = $this->si->getLicensesForProduct($this->cn);
if($this->si->is_error()){
$this->init_successfull = FALSE;
return;
}
- /* Saves object modifications
- */
- function save()
- {
- plugin::save();
-
- // Send modify/add events
- $mode = "modify";
- if($this->orig_dn == "new"){
- $mode = "add";
- }
-
- $this->si->createPool($this->cn, $this->description,$this->productIds,$this->softwareIds);#
- if($this->si->is_error()){
- msg_dialog::display(_("Error"),msgPool::siError($this->si->get_error()),ERROR_DIALOG);
- }else{
- $this->handle_post_events($mode);
- }
-
- // Log action
- if($mode == "modify"){
- new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$this->si->get_error());
- }else{
- new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$this->si->get_error());
- }
-
- return 0;
- }
-
-
- function remove_from_parent(){ return; }
+ function save( ){}
+ function remove_from_parent(){ }
static function plInfo()
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_licenseUsageByHost.inc
index 10d9a2074900fa63366d96cdfef82597f02962c6..9b38d320ad1d22ca18ff2d14bdd649df1ee02102 100644 (file)
$this->initially_was_account = FALSE;
}else{
$this->initially_was_account = TRUE;
- $this->cn = $this->orig_cn = preg_replace("/^opsi:cn=([^,]*),.*$/","\\1",$dn);
+ $this->cn = $this->orig_cn = preg_replace("/^opsi:=([^,]*),.*$/","\\1",$dn);
}
// Extract pool name out of the fake dn.
$this->init_successfull = TRUE;
}else{
- $res = $this->si->getLicenseUsage("", $this->cn);
+ $res = $this->si->getLicenseUsage($this->cn);
if($this->si->is_error()){
$this->init_successfull = FALSE;
return;
}
- /* Saves object modifications
- */
- function save()
- {
- plugin::save();
-
- // Send modify/add events
- $mode = "modify";
- if($this->orig_dn == "new"){
- $mode = "add";
- }
-
- $this->si->createPool($this->cn, $this->description,$this->productIds,$this->softwareIds);#
- if($this->si->is_error()){
- msg_dialog::display(_("Error"),msgPool::siError($this->si->get_error()),ERROR_DIALOG);
- }else{
- $this->handle_post_events($mode);
- }
-
- // Log action
- if($mode == "modify"){
- new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$this->si->get_error());
- }else{
- new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$this->si->get_error());
- }
-
- return 0;
- }
-
-
- function remove_from_parent(){ return; }
+ function save(){ }
+ function remove_from_parent(){ }
static function plInfo()
diff --git a/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc b/gosa-plugins/opsi/admin/opsiLicenses/class_opsiLicenseHandler.inc
index d7055cd55275481b609ccfd8a59e73b4a7b2f4ef..2fafdae3b0db9ce38aceccfcda736405f7841a33 100644 (file)
$data= array();
$data['productId'] = htmlentities($productId);
$res = $this->send_data("gosa_opsi_getLicenseInformationForProduct",$this->target,$data,TRUE);
+
+ print_a($res);
+
if(isset($res['XML'][0]['ANSWER_OPSI_UNASSIGNALLSOFTWARELICENSESFROMHOST'])){
return(TRUE);
}