From: hickert Date: Tue, 15 May 2007 07:12:45 +0000 (+0000) Subject: Added Logging for some services X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cdd2a49792a56aecaa8a4e327ac845947f983f5b;p=gosa.git Added Logging for some services git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6376 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc index 5d7ad0f64..62a15a9f3 100644 --- a/plugins/admin/systems/class_goCupsServer.inc +++ b/plugins/admin/systems/class_goCupsServer.inc @@ -24,10 +24,11 @@ class goCupsServer extends goService{ function goCupsServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Print service"); } + function execute() { $smarty = get_smarty(); diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc index 1a9347154..f5628c108 100644 --- a/plugins/admin/systems/class_goFaxServer.inc +++ b/plugins/admin/systems/class_goFaxServer.inc @@ -27,7 +27,7 @@ class goFaxServer extends goService { function goFaxServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("FAX database"); } diff --git a/plugins/admin/systems/class_goGlpiServer.inc b/plugins/admin/systems/class_goGlpiServer.inc index 5851b8f01..152ed03d3 100644 --- a/plugins/admin/systems/class_goGlpiServer.inc +++ b/plugins/admin/systems/class_goGlpiServer.inc @@ -29,7 +29,7 @@ class goGlpiServer extends goService { function goGlpiServer($config,$dn) { - plugin::plugin($config,$dn); + goService::goService($config,$dn); $this->DisplayName = _("Inventory database"); } diff --git a/plugins/admin/systems/class_goService.inc b/plugins/admin/systems/class_goService.inc index e4f629f85..515be0eb8 100644 --- a/plugins/admin/systems/class_goService.inc +++ b/plugins/admin/systems/class_goService.inc @@ -23,6 +23,10 @@ class goService extends plugin{ { plugin::plugin($config,$dn); $this->DisplayName = _("Empty service"); + + if($this->is_account){ + @log::log("view","server/".get_class($this),$this->dn); + } } @@ -88,7 +92,11 @@ class goService extends plugin{ }else{ $ldap->cd($this->dn); $ldap->add($this->attrs); + } + + @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 server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn)); $this->handle_post_events("remove"); } @@ -104,9 +112,11 @@ class goService extends plugin{ if($ldap->count()){ $ldap->cd($this->dn); $ldap->modify($this->attrs); + @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $ldap->cd($this->dn); $ldap->add($this->attrs); + @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } if($this->initially_was_account){ $this->handle_post_events("modify");