Code

Updated terminal copy & paste
[gosa.git] / plugins / admin / ogroups / class_ogroupManagement.inc
index 34cf7b7b2cdfde0f4b30f92b0ce1093a7ea74cb4..82550f477e61818cad138804579339fca8bb9070 100644 (file)
@@ -114,7 +114,7 @@ class ogroupManagement extends plugin
      ****************/
 
     /* Display the copy & paste dialog, if it is currently open */
-    $ret = $this->copyPasteHandling_from_queue($s_action);
+    $ret = $this->copyPasteHandling_from_queue($s_action,$s_entry);
     if($ret){
       return($ret);
     }
@@ -535,8 +535,22 @@ class ogroupManagement extends plugin
   }
 
 
-  function copyPasteHandling_from_queue($s_action)
+  function copyPasteHandling_from_queue($s_action,$s_entry)
   {
+    /* Check if Copy & Paste is disabled */
+    if(!is_object($this->CopyPasteHandler)){
+      return("");
+    }
+
+    /* Add a single entry to queue */
+    if($s_action == "cut" || $s_action == "copy"){
+
+      /* Cleanup object queue */
+      $this->CopyPasteHandler->cleanup_queue();
+      $dn = $this->ogrouplist[$s_entry]['dn'];
+      $this->CopyPasteHandler->add_to_queue($dn,$s_action,"ogrouptabs","OGROUPTABS","ogroups");
+    }
+
 
     /* Add entries to queue */
     if($s_action == "copy_multiple" || $s_action == "cut_multiple"){