summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bac5f25)
raw | patch | inline | side by side (parent: bac5f25)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 May 2007 06:40:38 +0000 (06:40 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 May 2007 06:40:38 +0000 (06:40 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6373 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc
index 2e6f7029814a0d49e6628220ee64de668b5fb49d..be0a560125f0c3640cc1686b7b5b4c76c3b2b43c 100644 (file)
$this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses, true);
/* Save dn for later references */
$this->orig_dn= $this->dn;
+
+ if($this->is_account){
+ @log::log("view","component/".get_class($this),$this->dn);
+ }
}
function execute()
$ldap= $this->config->get_ldap_link();
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
+
+ @log::log("remove","component/".get_class($this),$this->dn,$this->attributes,$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system component/generic with dn '%s' failed."),$this->dn));
$this->handle_post_events("remove");
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
+ @log::log("create","component/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("add");
+
} else {
if ($this->orig_dn != $this->dn){
$this->move($this->orig_dn, $this->dn);
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
-
+ @log::log("modify","component/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc
index 12e677ba6cd337070c02f8cdbd82bd5ab39ca631..937323083d3a6aa346e565916c11ffd54955e831 100644 (file)
var $objectclasses= array("whatever");
/* Used to remember if this was an account (simply: is this an edited entry) */
- var $initialy_was_account = false;
+ var $initially_was_account = false;
/* Remember current dialog */
var $edit_type = false;
/* set defaults */
$this->name = $this->dn;
$this->orig_dn = $this->dn;
- $this->initialy_was_account = $this->is_account;
-
+ $this->initially_was_account = $this->is_account;
+ if($this->is_account){
+ @log::log("view","undefined/".get_class($this),$this->dn);
+ }
}
function execute()
}
if(function_exists("mysql_pconnect")){
$this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
- if($this->initialy_was_account){
+ if($this->initially_was_account){
$this->handle->removeComputerInformations($this->dn);
+ @log::log("remove","undefined/".get_class($this),$this->dn);
}
}else{
print_red(_("Can't remove glpi account, while mysql extension is missing."));
+ @log::log("remove","undefined/".get_class($this),$this->dn,array(),_("Can't remove glpi account, while mysql extension is missing."));
}
}
return ($message);
}
+
/* Save to LDAP */
function save()
{
$this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
/* check if we have to update, add */
- if($this->initialy_was_account&&$this->is_account){
+ if($this->initially_was_account&&$this->is_account){
$this->handle->updateComputerInformations($attrs,$this->orig_dn);
+ @log::log("modify","undefined/".get_class($this),$this->dn);
}elseif($this->is_account){
$this->handle->addComputerInformations($attrs,$this->dn);
+ @log::log("create","undefined/".get_class($this),$this->dn);
}
$tmp = $this->handle->getComputerInformations($this->dn);
$this->handle->addDevicesToComputer($this->usedDevices,$tmp[0]['ID']);
}
}
+
/* Return used attachments */
function getUsedAttachments($divlist = false)
{
diff --git a/plugins/admin/systems/class_glpiPrinterAccount.inc b/plugins/admin/systems/class_glpiPrinterAccount.inc
index 68232a83267eab8e001a2cacd886db3237861f51..fb8ce7e49ac8acbeb2b17e9e5ccf35c24fa7efa1 100644 (file)
$this->name = $this->dn;
$this->orig_dn = $this->dn;
$this->initially_was_account = $this->is_account;
+
+ if($this->is_account){
+ @log::log("view","printer/".get_class($this),$this->dn);
+ }
}
function execute()
{
$this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
if($this->initially_was_account){
- $this->handle->removePrinterInformations($this->dn);
+ $this->handle->removePrinterInformations($this->dn);
+ @log::log("remove","printer/".get_class($this),$this->dn);
}
}
$this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
if($this->initially_was_account&&$this->is_account){
$this->handle->updatePrinterInformations($attrs,$this->dn);
+ @log::log("modify","printer/".get_class($this),$this->dn);
}elseif($this->is_account){
$this->handle->addPrinterInformations($attrs,$this->dn);
+ @log::log("create","printer/".get_class($this),$this->dn);
}
$tmp = $this->handle->getPrinterInformations($this->dn);
$this->handle->addAttachmentsToPrinter($this->usedAttachments,$tmp[0]['ID']);