Code

Added logging to mimetypes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 May 2007 09:55:24 +0000 (09:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 May 2007 09:55:24 +0000 (09:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6394 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/mimetypes/class_mimetypeGeneric.inc

index 6541eeb3593e35ba1a1b0555f0fdbf9f1aa43cbb..4f53f6b066bd56be93430f133b31a4d15fba7091 100644 (file)
@@ -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");