X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_CopyPasteHandler.inc;h=334bd988dc6e3c55e51552274d5b63439a1b3155;hb=67f6e5cf3fb83f779420c6b9a1451b9f7b6b7c65;hp=4ec220be551b28193731719c6d999a5d3af27071;hpb=d9076ca7458dfb4e8082f5a170ffdea241b9ae01;p=gosa.git
diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc
index 4ec220be5..334bd988d 100644
--- a/include/class_CopyPasteHandler.inc
+++ b/include/class_CopyPasteHandler.inc
@@ -124,9 +124,29 @@ class CopyPasteHandler {
/* Cut & paste
*/
if($this->cutCurrent){
- $this->current->save();
- $this->dialogOpen =false;
- $this->Clear();
+
+ if(isset($_POST['PerformCopyPaste'])){
+ $msgs = $this->check();
+ if(count ($msgs) ){
+ foreach( $msgs as $msg){
+ print_red($msg);
+ }
+ }else{
+ $this->current->save();
+ $this->dialogOpen =false;
+ $this->Clear();
+ }
+ }
+ if($this->current){
+ $smarty = get_smarty();
+ $smarty->assign("type","cut");
+ $smarty->assign("Complete",false);
+ $smarty->assign("AttributesToFix"," ");
+ $smarty->assign("SubDialog",$this->current->SubDialog);
+ $smarty->assign("objectDN" ,$this->objectdn);
+ $smarty->assign("message", sprintf(_("You are going to paste the cutted entry '%s'."), $this->objectdn));
+ return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE)));
+ }
/* Copy & paste
*/
@@ -139,17 +159,19 @@ class CopyPasteHandler {
}
}else{
$this->current->save();
+ $this->lastdn = $this->current->dn;
$this->dialogOpen =false;
$this->Clear();
}
}
if($this->current){
$smarty = get_smarty();
+ $smarty->assign("type","copy");
$smarty->assign("Complete",false);
$smarty->assign("AttributesToFix",$this->generateAttributesToFix());
$smarty->assign("SubDialog",$this->current->SubDialog);
$smarty->assign("objectDN" ,$this->objectdn);
- $smarty->assign("message", sprintf(_("You are going to copy the entry '%s'."), $this->objectdn));
+ $smarty->assign("message", sprintf(_("You are going to paste the copied entry '%s'."), $this->objectdn));
return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE)));
}
}
@@ -215,7 +237,7 @@ class CopyPasteHandler {
$Copy_Paste.= " ";
}else{
- $Copy_Paste.= "
";
+ $Copy_Paste.= "
";
}
return ($Copy_Paste);