From: hickert Date: Wed, 16 May 2007 09:55:24 +0000 (+0000) Subject: Added logging to mimetypes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d2dfc3b0e63eaffab13f83350edf319f90f03a30;p=gosa.git Added logging to mimetypes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6394 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc index 6541eeb35..4f53f6b06 100644 --- a/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -127,6 +127,7 @@ class mimetype extends plugin $this->base= dn2base($ui->dn); } } else { + @log::log("view","mimetypes/".get_class($this),$this->dn); $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn); } @@ -453,10 +454,12 @@ class mimetype extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify($this->attrs); + @log::log("modify","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); + @log::log("create","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of mime type/generic with dn '%s' failed."),$this->dn)); } @@ -465,9 +468,11 @@ class mimetype extends plugin /* Remove current mime type */ function remove_from_parent() { + plugin::remove_from_parent(); $ldap = $this->config->get_ldap_link(); $ldap->rmDir($this->dn); show_ldap_error($ldap->get_error(), sprintf(_("Removing of mime type/generic with dn '%s' failed."),$this->dn)); + @log::log("remove","mimetypes/".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");