Code

Updated copy & paste for ogroups
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Oct 2009 08:35:05 +0000 (08:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Oct 2009 08:35:05 +0000 (08:35 +0000)
-We are now able to copy AccessTo

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14460 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/ogroups/class_ogroup.inc

index 991937afa05d319245796a9047aa368ded4ff50d..1a87f3aa3d78d2ae48b297b88adc2abb275fc8e2 100644 (file)
@@ -1056,10 +1056,7 @@ class ogroup extends plugin
   
   function PrepareForCopyPaste($source)
   {
-    /* Update available object types */
-    if(isset($source['gosaGroupObjects'][0])){
-      $this->gosaGroupObjects =  $source['gosaGroupObjects'][0];
-    }
+    plugin::PrepareForCopyPaste($source);
 
     /* Reload tabs */
     $this->parent->reload($this->gosaGroupObjects );
@@ -1071,16 +1068,10 @@ class ogroup extends plugin
       }
     }
 
-    /* Load member objects */
-    if (isset($source['member'])){
-      foreach ($source['member'] as $key => $value){
-        if ("$key" != "count"){
-          $value= @LDAP::convert($value);
-          $this->member["$value"]= "$value";
-        }
-      }
+    $source_o = new ogroup ($this->config, $source['dn']);
+    foreach(array("accessTo","member","gosaGroupObjects")  as $attr){
+      $this->$attr = $source_o->$attr;
     }
-
   }