Code

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

plugins/admin/applications/class_applicationGeneric.inc
plugins/admin/applications/class_applicationManagement.inc

index 3b744aa1bd04ffccbc10b61515c5f9fdb16a8a28..a82acc5b119f10e7801ff74c12f1677914810548 100644 (file)
@@ -335,21 +335,21 @@ class application extends plugin
 
           /* Load the new uploaded Photo */
           if(!$handle  =  imagick_ReadImage($_FILES['picture_file']['tmp_name'])){
-            gosa_log("Can't Load image");
+            print_red(_("Can't access uploaded image."));
           }
 
           /* Resizing image to 147x200 and blur */
           if(!imagick_resize($handle,48,48,IMAGICK_FILTER_GAUSSIAN,0)){
-            gosa_log("imagick_resize failed");
+            print_red(_("Uploaded image could not be resized, possilby the image magick extension is missing."));
           }
 
           /* Converting image to JPEG */
           if(!imagick_convert($handle,"PNG")) {
-            gosa_log("Can't Convert to PNG");
+            print_red(_("Could not convert image to png, possilby the image magick extension is missing."));
           }
 
           if(imagick_writeimage($handle,$_FILES['picture_file']['tmp_name'])){
-            gosa_log("can't write to specified folder");
+            print_red(sprintf(_("Could not save uploaded image to %s."),$_FILES['picture_file']['tmp_name']));
           }
 
           imagick_free($handle);
index 3c23e835e4468356beed4a016d356da94c313ddf..8ce6dc1840255f6109c41e7f3382b2f0b63dccc1 100644 (file)
@@ -210,7 +210,6 @@ class applicationManagement extends plugin
         /* Save data data to ldap */
         $this->apptabs->set_release($this->DivListApplication->selectedRelease);
         $this->apptabs->save();
-        gosa_log ("Application object'".$this->dn."' has been saved");
 
         if (!isset($_POST['edit_apply'])){
           /* Application has been saved successfully, remove lock from
@@ -312,7 +311,6 @@ class applicationManagement extends plugin
           $this->apptabs= new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $dn,"application");
           $this->apptabs->set_acl_base($dn);
           $this->apptabs->delete ();
-          gosa_log ("Application object'".$dn."' has been removed");
           unset ($this->apptabs);
           $this->apptabs= NULL;
 
@@ -320,7 +318,7 @@ class applicationManagement extends plugin
           /* Normally this shouldn't be reached, send some extra
              logs to notify the administrator */
           print_red (_("You are not allowed to delete this application!"));
-          gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
+          @log::log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion.");
         }
         /* Remove lock file after successfull deletion */
         del_lock ($dn);
@@ -396,7 +394,6 @@ class applicationManagement extends plugin
         $this->apptabs= new apptabs($this->config, $this->config->data['TABS']['APPSTABS'], $this->dn,"application");
         $this->apptabs->set_acl_base($this->dn);
         $this->apptabs->delete ();
-        gosa_log ("Application object'".$this->dn."' has been removed");
         unset ($this->apptabs);
         $this->apptabs= NULL;
 
@@ -405,7 +402,7 @@ class applicationManagement extends plugin
         /* Normally this shouldn't be reached, send some extra
            logs to notify the administrator */
         print_red (_("You are not allowed to delete this application!"));
-        gosa_log ("Warning: '".$this->ui->uid."' tried to trick group deletion.");
+        @log::log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion.");
       }
 
       /* Remove lock file after successfull deletion */