X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_CopyPasteHandler.inc;h=afb2a117ec147840cf00c55b04a2e4a639b476e8;hb=1023c4f367b8d2e9ff45ccae274013e28fe1a0cc;hp=481241092c234cf20d1a9d2ae3cde5b94e437ed9;hpb=f50ef17975b60fd8c6394f8c6e7f1250bd95b1eb;p=gosa.git diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc index 481241092..afb2a117e 100644 --- a/include/class_CopyPasteHandler.inc +++ b/include/class_CopyPasteHandler.inc @@ -55,6 +55,12 @@ class CopyPasteHandler { $this->copyCurrent = true; $this->objectdn = $obj->dn; $this->current = $emptyObj; + + if(!isset($obj->by_object)){ + trigger_error("No valid tab object specified for copy & paste."); + return; + } + foreach($obj->by_object as $name => $obj){ /* Prepare every single class, to be copied */ @@ -126,9 +132,16 @@ class CopyPasteHandler { if($this->cutCurrent){ if(isset($_POST['PerformCopyPaste'])){ - $this->current->save(); - $this->dialogOpen =false; - $this->Clear(); + $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();