Code

fixed logging
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 May 2007 06:39:40 +0000 (06:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 May 2007 06:39:40 +0000 (06:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6439 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/addressbook/class_addressbook.inc
plugins/admin/acl/class_aclManagement.inc
setup/class_setupStep_Migrate.inc

index b9f5c72c13f4a428471a7125e86f18ff773965cf..f766133f36b200d48842c58c6495f133128053c0 100644 (file)
@@ -203,14 +203,14 @@ class addressbook extends plugin
         $ldap->rmdir ($this->dn);
         @log::log("remove","addressbook/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
         show_ldap_error($ldap->get_error(), sprintf(_("Removing of addressbook entry '%s' failed."),$this->dn));
-        gosa_log ("Address book object'".$this->dn."' has been removed");
-
+        @log::log("remove","addressbook/".get_class($this),$this->dn,array(),"Address book object'".$this->dn."' has been removed");
+  
       } else {
 
         /* Normally this shouldn't be reached, send some extra
            logs to notify the administrator */
         print_red (_("You are not allowed to delete this entry!"));
-        gosa_log ("Warning: '".$this->ui->uid."' tried to trick address book deletion.");
+        @log::log("remove","addressbook/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick address book deletion.");
       }
 
       /* Remove lock file after successfull deletion */
@@ -242,7 +242,6 @@ class addressbook extends plugin
       /* No errors, save object */
       if (count ($message) == 0){
         $this->save();
-        gosa_log ("Addressbook object '".$this->dn."' has been saved");
 
         /* Clean up */
         if (isset($_SESSION['saved_start'])){
index 8b3ccd1c21b62073455268625aa466a9503a6c82..450214858ed2c6a35f6d7730a434841a29c0c702 100644 (file)
@@ -246,7 +246,6 @@ class aclManagement extends plugin
         /* Delete request is permitted, perform LDAP action */
         $this->acltabs= new aclroletab($this->config, NULL,$this->dn);
         $this->acltabs->delete();
-        gosa_log ("ACL role object '".$this->dn."' has been removed");
         unset ($this->acltabs);
         $this->acltabs= NULL;
       } else {
@@ -256,7 +255,7 @@ class aclManagement extends plugin
         print_red (_("You are not allowed to delete this acl role!"));
 
         if(isset($this->ui->uid)){
-          gosa_log ("Warning: '".$this->ui->uid."' tried to trick acl role deletion.");
+          @log::log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion.");
         }
       }
 
@@ -310,7 +309,6 @@ class aclManagement extends plugin
         /* Delete request is permitted, perform LDAP action */
         $this->acltabs= new acl($this->config, NULL,$this->dn);
         $this->acltabs->remove_from_parent();
-        gosa_log ("ACL object '".$this->dn."' has been removed");
         unset ($this->acltabs);
         $this->acltabs= NULL;
       } else {
@@ -320,7 +318,8 @@ class aclManagement extends plugin
         print_red (_("You are not allowed to delete this acl!"));
 
         if(isset($this->ui->uid)){
-          gosa_log ("Warning: '".$this->ui->uid."' tried to trick acl deletion.");
+          @log::log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role      deletion.");
+          
         }
       }
 
@@ -357,10 +356,8 @@ class aclManagement extends plugin
 
         /* Save acl data to ldap */
         if($this->acltabs->save() == 1){
-          gosa_log ("ACL object '".$this->dn."' saving failed.");
           return;
         }
-        gosa_log ("ACL object '".$this->dn."' has been saved");
 
         if (!isset($_POST['edit_apply'])){
 
index b166c1a3767d54843a2e81ede57e5220c5301b25..864cee4f1ad43e267cfb2d55a2b8d40e92eb991e 100644 (file)
@@ -462,7 +462,8 @@ class Step_Migrate extends setup_step
     $res = $ldap->add($testEntry);
     $ldap->cat($dn);
     if(!$ldap->count()){
-      gosa_log($ldap->get_error());
+      @log::log("view","setup/".get_class($this),$dn,array(),$ldap->get_error());
+
       $this->checks['permissions']['STATUS']    = FALSE;
       $this->checks['permissions']['STATUS_MSG']= _("Failed");
       $this->checks['permissions']['ERROR_MSG'] = 
@@ -475,7 +476,7 @@ class Step_Migrate extends setup_step
     $res = $ldap->rmDir($dn);
     $ldap->cat($dn);
     if($ldap->count()){
-      gosa_log($ldap->get_error());
+      @log::log("view","setup/".get_class($this),$dn,array(),$ldap->get_error());
       $this->checks['permissions']['STATUS']    = FALSE;
       $this->checks['permissions']['STATUS_MSG']= _("Failed");
       $this->checks['permissions']['ERROR_MSG'] =