From c97773cf4577283e1c024ccf0493d3a742c074e1 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 12 Jun 2007 07:27:50 +0000 Subject: [PATCH] Updated Copy & Paste to, support acl category git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6566 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_CopyPasteHandler.inc | 8 +++++--- plugins/admin/users/class_userManagement.inc | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/class_CopyPasteHandler.inc b/include/class_CopyPasteHandler.inc index 669eecbdb..613f05f17 100644 --- a/include/class_CopyPasteHandler.inc +++ b/include/class_CopyPasteHandler.inc @@ -35,7 +35,7 @@ class CopyPasteHandler { * array['tab_class'] - Tab object that should be used to initialize the new object * array['tab_object'] - Tab object name used to initialize correct object Type like USERTABS */ - function add_to_queue($dn,$action,$tab_class,$tab_object) + function add_to_queue($dn,$action,$tab_class,$tab_object,$tab_acl_category) { if(!class_exists($tab_class)){ trigger_error(sprintf("Specified class object '%s' does not exists.",$tab_class)); @@ -59,6 +59,7 @@ class CopyPasteHandler { $tmp['dn'] = $dn; $tmp['tab_class'] = $tab_class; $tmp['tab_object']= $tab_object; + $tmp['tab_acl_category']= $tab_acl_category; $this->queue[] = $tmp; } } @@ -168,11 +169,12 @@ class CopyPasteHandler { $entry = $this->queue[$key]; $tab_c = $entry['tab_class']; $tab_o = $entry['tab_object']; + $tab_a = $entry['tab_acl_category']; if($entry['method'] == "copy"){ - $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],"new"); + $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],"new",$tab_a); }else{ - $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],$entry['dn']); + $entry['object'] = new $tab_c($this->config,$this->config->data['TABS'][$tab_o],$entry['dn'],$tab_a); } $entry['source_data'] = $this->load_attributes_from_hdd($entry['file_name']); diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index e9fc05ba6..6109af834 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -893,10 +893,10 @@ class userManagement extends plugin $dn = $this->list[$id]['dn']; if($s_action == "copy_multiple"){ - $this->CopyPasteHandler->add_to_queue($dn,"copy","usertabs","USERTABS"); + $this->CopyPasteHandler->add_to_queue($dn,"copy","usertabs","USERTABS","users"); } if($s_action == "cut_multiple"){ - $this->CopyPasteHandler->add_to_queue($dn,"cut","usertabs","USERTABS"); + $this->CopyPasteHandler->add_to_queue($dn,"cut","usertabs","USERTABS","users"); } } } -- 2.30.2