Code

Updated in_array checks in GOsa.
[gosa.git] / gosa-core / include / class_CopyPasteHandler.inc
index 587cdcc901c95143a375540d660294cf147e2e7b..1149370076b558c8f19c07a94fd80e5169a97006 100644 (file)
@@ -73,7 +73,7 @@ class CopyPasteHandler {
       return(FALSE);
     }
 
-    if(!in_array($action,array("cut","copy"))){
+    if(!in_array_strict($action,array("cut","copy"))){
       trigger_error(sprintf("Specified action %s does not exists for copy & paste.", bold($action)));
       return(FALSE);
     } 
@@ -156,7 +156,7 @@ class CopyPasteHandler {
 
     /* Check if given dn is valid and ldap search was succesfull */ 
     if(!$res){
-      $msg= sprintf(_("Copy and paste failed!")."<br><br>"._("Error").": "._("'%s' is no vaild LDAP object"), bold(LDAP::fix($dn)));
+      $msg= sprintf(_("Copy and paste failed!")."<br><br>"._("Error").": "._("'%s' is no valid LDAP object"), bold(LDAP::fix($dn)));
       msg_dialog::display(_("Internal error"), $msg, ERROR_DIALOG);
       new log("copy","all/all",$dn,array(), $msg);
       return(FALSE);
@@ -417,7 +417,8 @@ class CopyPasteHandler {
         $smarty->assign("AttributesToFix",$this->generateAttributesToFix());
         $smarty->assign("SubDialog",$this->current['object']->SubDialog);
         $smarty->assign("objectDN",$this->current['source_data']['dn']);
-        $smarty->assign("message", sprintf(_("This object will be pasted: %s"), "<br><br>".bold($this->current['source_data']['dn'])));
+        $smarty->assign("message", sprintf(_("This object will be pasted: %s"), "<br><br>".
+                    bold(@LDAP::fix($this->current['source_data']['dn']))));
         return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE)));
       }
     }