Code

Updated Copy & Paste to, support acl category
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Jun 2007 07:27:50 +0000 (07:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Jun 2007 07:27:50 +0000 (07:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6566 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_CopyPasteHandler.inc
plugins/admin/users/class_userManagement.inc

index 669eecbdb97a36aa9082aa00bea1da511a8e7ed0..613f05f17355fda07aee1106296d480cc882d69d 100644 (file)
@@ -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']);
index e9fc05ba62c8ad2040f000a56858a35cb36451ac..6109af8349f5887e17ccdc8febaef6f68679728b 100644 (file)
@@ -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");
         }
       }
     }