summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: edbcac0)
raw | patch | inline | side by side (parent: edbcac0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 May 2007 09:38:49 +0000 (09:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 15 May 2007 09:38:49 +0000 (09:38 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6384 594d385d-05f5-0310-b6e9-bd551577e9d8
15 files changed:
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index 928b7e317ee5aae18aa5fac9d80ea0e8a4008e96..5f2fd42200ae5aea5e88cc0fa8a7dd79069ae8a8 100644 (file)
/* Save dn for later references */
$this->orig_dn= $this->dn;
+
+ if($this->is_account){
+ @log::log("view","phone/".get_class($this),$this->dn);
+ }
}
function set_acl_base($base)
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
+
+ @log::log("remove","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system phone/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","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("add");
} else {
if ($this->orig_dn != $this->dn){
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
// $user_phone_reload
$ldap->cd ($this->config->current['BASE']);
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 68adab4586198816ed18833671a4a71ef16bff59..9000b008bebf3a644e6f6a9fff24d2bc915f51b3 100644 (file)
}
}
}
+
+ if($this->is_account){
+ @log::log("view","printer/".get_class($this),$this->dn);
+ }
}
function set_acl_base($base)
/* Remove account & dns extension */
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
+
+ @log::log("remove","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system print/generic with dn '%s' failed."),$this->dn));
$this->handle_post_events("remove");
$ldap->add($this->attrs);
$this->handle_post_events("add");
+ @log::log("create","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
} else {
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
$this->handle_post_events("modify");
+ @log::log("modify","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system print/generic with dn '%s' failed."),$this->dn));
index f841affd653cd372ca09f8967b4944c43d0de81d..7796dc7201e2af683643bf61d076254635788d12 100644 (file)
function servdhcp ($config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
+
+ if($this->is_account){
+ @log::log("view","unknown/".get_class($this),$this->dn);
+ }
}
function execute()
function remove_from_parent()
{
/* This cannot be removed... */
+ @log::log("remove","unknown/".get_class($this),$this->dn);
}
function save()
{
plugin::save();
+ @log::log("modfiy","unknown/".get_class($this),$this->dn);
/* Optionally execute a command after we're done */
#$this->handle_post_events($mode);
index 793acb21dafd672009cf25998d00fe90af6f7d63..c32ac192d20f3fa87a1867d16f2f6005d8779e8f 100644 (file)
}else{
$this->is_account = true;
}
+
+ if($this->is_account){
+ @log::log("view","unknown/".get_class($this),$this->dn);
+ }
+
$this->initially_was_account = $this->is_account;
}
foreach($tmp['zoneUpdates'] as $dn => $attrs){
$ldap->cd($dn);
$ldap->modify($attrs);
+ @log::log("modfiy","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Updating of system server/dns with dn '%s' failed."),$this->dn));
}
}
foreach($tmp['del'] as $dn => $del){
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
+ @log::log("remove","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/dns with dn '%s' failed."),$this->dn));
}
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index be0ae77afc5c4fc36772cff54f3ea0c5320704d5..691853b4b2f3628ed3ee0b9bc09bbb9462d77cc4 100644 (file)
$this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
$this->netConfigDNS->set_acl_category("server");
$this->netConfigDNS->set_acl_base($this->base);
-
+
+ if($this->is_account){
+ @log::log("view","server/".get_class($this),$this->dn);
+ }
+
/* Save dn for later references */
$this->orig_dn= $this->dn;
}
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
+
+ @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/generic with dn '%s' failed."),$this->dn));
/* Delete references to object groups */
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
+ @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$mode= "add";
} else {
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$mode= "modify";
}
index 5c036d1965b74e0191bd0ca2d0b0bb5636bc9343..3b666fd43bbae9848f4ebb8cfcc630909d4d4c81 100644 (file)
}
}
+ if($this->is_account){
+ @log::log("view","server/".get_class($this),$this->dn);
+ }
}
gosa_log("Removing ".$this->hostname." from list of kolabHosts");
}
+ @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
/* Optionally execute a command after we're done */
$this->handle_post_events("remove");
}
$ldap->cd($this->dn);
$this->cleanup();;
$ldap->$mode($this->attrs);
+
+ if($mode == "add"){
+ @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving system server/kolab with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc
index c84d4976cbcc87837e4ed55f8b1dbe28f689f7d6..740fdf0ea6a668b85825bcf73751db54c7b6ee25 100644 (file)
$this->repositories[$tmp[2]]=$tmp2;
}
}
+
+ if($this->is_account){
+ @log::log("view","server/".get_class($this),$this->dn);
+ }
}
function execute()
$ldap->add($this->attrs);
$this->handle_post_events("add");
}
+
+ if($this->initially_was_account){
+ @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }else{
+ @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ }
}
index cb678cbccdff2900cf757a87e80b5298bd66a738..1161e598b84d476ec2bba219c4e91941d42b438a 100644 (file)
/* Store initally account settings
*/
$this->initially_was_account = $this->DNS_is_account;
+
+ if($this->DNS_is_account){
+ @log::log("view","unknown/".get_class($this),$this->dn);
+ }
}
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
}
+ @log::log("remove","unknown/".get_class($this),$dn);
}
}
}
}
+ @log::log("modify","unknown/".get_class($this),$dn,array_keys($attrs),$ldap->get_error());
+
/* Display errors
*/
if($ldap->get_error() != "Success"){
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 0495e0bda05e9b6389971045a8efa60eb1426df2..7223479082be051868eaf1822669d6d09bde6577 100644 (file)
}
$this->orig_dn= $this->dn;
+
+ if($this->is_account){
+ @log::log("view","terminal/".get_class($this),$this->dn);
+ }
}
function set_acl_base($base)
if($ldap->count()){
$this->netConfigDNS->remove_from_parent();
$ldap->rmDir($this->dn);
+
+ @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Removing of object system terminal/generic with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
unset($this->attrs['gotoNtpServer']);
}
$ldap->add($this->attrs);
+ @log::log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("add");
} else {
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
-
+ @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc
index ac449433ab44c1dda0079afdd82586cfed8e1011..20407b4f24f7050e05f1e7cc098a39ac67e396e9 100644 (file)
$this->gotoXHsync = preg_replace("/\+/","-",$this->gotoXHsync);
$this->gotoXVsync = preg_replace("/\+/","-",$this->gotoXVsync);
}
+
+ @log::log("view","terminal/".get_class($this),$this->dn);
}
function execute()
function remove_from_parent()
{
+ @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs));
$this->handle_post_events("remove");
}
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/service with dn '%s' failed."),$this->dn));
$this->handle_post_events("modify");
diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc
index d84b8c229b2de249f989d8a128ec4b3681173574..554118db406ba56482a279773e267e79bff3faec 100644 (file)
}
}
}
+ @log::log("view","terminal/".get_class($this),$this->dn);
}
function execute()
{
if($this->acl_is_removeable()){
$this->handle_post_events("remove");
+ @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs));
}
}
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/startup with dn '%s' failed."),$this->dn));
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc
index b7f0eb76502c0b4bde04f8180f682b9b7db622f0..fef7254f884fe0089f0e5b1a02255c339ec94fd5 100644 (file)
$this->orig_dn= $this->dn;
$this->cn= preg_replace("/\\\$\$/","",$this->cn);
+
+ if($this->is_account){
+ @log::log("view","winworkstation/".get_class($this),$this->dn);
+ }
}
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
+ @log::log("remove","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system wingeneric/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","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("add");
} else {
if ($this->orig_dn != $this->dn){
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
-
+ @log::log("modify","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index f26f4a44582aa2345481d7ca7b0d24dc74d046f5..87eba977e0ac9c1b17e2d922a509ff548ad2fd78 100644 (file)
$this->gotoSyslogServers[$server] = $visible;
}
+ if($this->is_account){
+ @log::log("view","workstation/".get_class($this),$this->dn);
+ }
+
/* Save 'dn' for later referal */
$this->orig_dn= $this->dn;
}
$this->netConfigDNS->remove_from_parent();
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
+ @log::log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn));
/* Optionally execute a command after we're done */
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
+ @log::log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
if(!$this->didAction){
$this->handle_post_events("add");
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
if(!$this->didAction){
$this->handle_post_events("modify");
diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc
index a5fae17b8bbdd799c21d40206f7d5e59daa484f4..51a0cab019b13104c0ca74f8f26f4830d769f099 100644 (file)
$this->MouseTypes= array('AUTO' => _("inherited"));
$this->MousePorts= array('AUTO' => _("inherited"));
}
+
+ @log::log("view","workstation/".get_class($this),$this->dn);
}
function execute()
function remove_from_parent()
{
$this->handle_post_events("remove");
+ @log::log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
/* Save data to object */
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/service with dn '%s' failed."),$this->dn));
$this->handle_post_events("modify");
}
diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc
index 3c587552768ecf594a36000acaafaf6775eed7c2..dc8aebdc3bcb533b342f1c0387041455c335ef12 100644 (file)
if (!isset($this->gotoBootKernels['default-inherited']) && $this->gotoBootKernel == "default-inherited"){
$this->gotoBootKernel= "default";
}
+
+ @log::log("view","workstation/".get_class($this),$this->dn);
}
function remove_from_parent()
{
$this->handle_post_events("remove");
+ @log::log("remove","workstation/".get_class($this),$this->dn);
}
function generateDNSyn($release)
$this->cleanup();
$ldap->modify ($this->attrs);
+ @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/startup with dn '%s' failed."),$this->dn));
$this->handle_post_events("modify");