From 7f97a94471502dae559a5b2526709c4939572106 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Jun 2007 10:54:26 +0000 Subject: [PATCH] Enabled single cut and paste git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6569 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/class_groupManagement.inc | 13 +++++++++++-- plugins/admin/ogroups/class_ogroupManagement.inc | 14 ++++++++++++-- plugins/admin/users/class_userManagement.inc | 11 +++++++++-- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 2e5aaa0cd..09a89297c 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -130,7 +130,7 @@ class groupManagement 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); } @@ -595,8 +595,17 @@ class groupManagement extends plugin } - function copyPasteHandling_from_queue($s_action) + function copyPasteHandling_from_queue($s_action,$s_entry) { + /* Add a single entry to queue */ + if($s_action == "cut" || $s_action == "copy"){ + + /* Cleanup object queue */ + $this->CopyPasteHandler->cleanup_queue(); + $dn = $this->grouplist[$s_entry]['dn']; + $this->CopyPasteHandler->add_to_queue($dn,$s_action,"grouptabs","GROUPTABS","groups"); + } + /* Add entries to queue */ if($s_action == "copy_multiple" || $s_action == "cut_multiple"){ diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index 34cf7b7b2..be2c78cf8 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -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,9 +535,19 @@ class ogroupManagement extends plugin } - function copyPasteHandling_from_queue($s_action) + function copyPasteHandling_from_queue($s_action,$s_entry) { + /* 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"){ diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 6109af834..ce16140a1 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -121,7 +121,7 @@ class userManagement extends plugin /* Display the copy & paste dialog, if it is currently open */ if($this->CPPasswordChange == ""){ - $ret = $this->copyPasteHandling_from_queue($s_action); + $ret = $this->copyPasteHandling_from_queue($s_action,$s_entry); if($ret){ return($ret); } @@ -879,8 +879,15 @@ class userManagement extends plugin } - function copyPasteHandling_from_queue($s_action) + function copyPasteHandling_from_queue($s_action,$s_entry) { + /* Add a single entry to queue */ + if($s_action == "cut" || $s_action == "copy"){ + /* Cleanup object queue */ + $this->CopyPasteHandler->cleanup_queue(); + $dn = $this->list[$s_entry]['dn']; + $this->CopyPasteHandler->add_to_queue($dn,$s_action,"usertabs","USERTABS","users"); + } /* Add entries to queue */ if($s_action == "copy_multiple" || $s_action == "cut_multiple"){ -- 2.30.2