From ffdd2d55d417b723f997e8b8dd1fcd38aa4885a5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 15 May 2007 13:05:59 +0000 Subject: [PATCH] Added logging to apps git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6387 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/applications/class_applicationGeneric.inc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index a18a27e08..5ecab3a94 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -70,10 +70,15 @@ class application extends plugin $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn); } } + + if($this->is_account && $dn != "new"){ + @log::log("view","application/".get_class($this),$this->dn); + } } - function generateTemplate(){ + function generateTemplate() + { $str= "# This code is part of GOsa (https://gosa.gonicus.de)\n#\n"; $values = array(); @@ -224,6 +229,7 @@ class application extends plugin { $ldap= $this->config->get_ldap_link(); $ldap->rmDir($this->dn); + @log::log("remove","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of application with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ @@ -450,6 +456,7 @@ class application extends plugin $this->cleanup(); $ldap->modify ($this->attrs); $this->handle_post_events("modify"); + @log::log("modify","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } else { /* Remove gotoLogonScript if it is empty */ @@ -461,6 +468,7 @@ class application extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); + @log::log("create","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add"); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of application with dn '%s' failed."),$this->dn)); -- 2.30.2