Code

Removed remaining print_red's
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Jan 2008 18:02:06 +0000 (18:02 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Jan 2008 18:02:06 +0000 (18:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8238 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_CopyPasteHandler.inc

index 610e6a70888662ae6f41a18a086a026abd9dba1a..60bf1270ed02194ccf5005d5c3c66e978d016e2c 100644 (file)
@@ -230,9 +230,9 @@ class CopyPasteHandler {
       }
       return(unserialize($data));
     }else{
-      print_red(sprintf(_("Could not load dumped file '%s', from hard disk drive."),$filename));
-      new log("copy","all/all",$dn,array(), 
-          sprintf(sprintf("Could not load dumped file '%s', from hard disk drive.",$filename)));
+      $msg= sprintf(_("Cannot load dumped file '%s'!"),$filename);
+      msg_dialog::display(_("Internal error"), $msg, ERROR_DIALOG);
+      new log("copy","all/all",$dn,array(), $msg);
       return(FALSE);
     }
   }
@@ -255,10 +255,10 @@ class CopyPasteHandler {
  
           /* Check permissions */ 
           if(!preg_match("/((c|w)|(w|c))/",$acl)){
-            print_red(sprintf(_("You are not allowed to cut and paste the following object '%s'."),$this->current['dn']));
+            msg_dialog::display(_("Error"), sprintf(_("You have no permission to save object '%s'."), $this->current['dn']), ERROR_DIALOG);
           }elseif(count ($msgs) ){
             foreach( $msgs as $msg){
-              print_red($msg);
+              msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
             }
           }else{
 
@@ -296,10 +296,10 @@ class CopyPasteHandler {
  
         /* Check permissions */ 
         if(!preg_match("/((c|w)|(w|c))/",$acl)){
-          print_red(sprintf(_("You are not allowed to copy and paste the following object '%s'."),$this->current['dn']));
+          msg_dialog::display(_("Error"), sprintf(_("You have no permission to copy and paste object '%s'!"),$this->current['dn']), ERROR_DIALOG);
         }elseif(count ($msgs) ){
           foreach( $msgs as $msg){
-            print_red($msg);
+            msg_dialog::display(_("Error"), $msg, ERROR_DIALOG);
           }
         }else{
           $this->current['object']->save();