Code

Updated groups
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Jun 2010 11:15:07 +0000 (11:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 7 Jun 2010 11:15:07 +0000 (11:15 +0000)
-Samba groups can now be copied again.

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

gosa-core/plugins/admin/groups/class_group.inc

index 0ffdff7b73f69fce2db6836dd264df7e08175de9..c5daaf909d7c1ea54f9c437a7ddf845f36c6adbd 100644 (file)
@@ -1185,20 +1185,22 @@ class group extends plugin
 
   function PrepareForCopyPaste($source)
   {
-    plugin::PrepareForCopyPaste($source);
+      plugin::PrepareForCopyPaste($source);
 
-    $this->trustModeDialog->PrepareForCopyPaste($source);
+      $this->trustModeDialog->PrepareForCopyPaste($source);
 
-    if ($this->smbgroup) { 
-      $this->sambaSID = $this->getSambaSID(); 
-    } 
+      // Detect samba groups and adapt its values.
+      $this->smbgroup = in_array('sambaGroupMapping', $source['objectClass']);
+      if ($this->smbgroup) { 
+          $this->sambaSID = $this->getSambaSID(); 
+      } 
 
-    $this->memberUid = array();
-    if(isset($source['memberUid'])){
-      for($i = 0 ; $i < $source['memberUid']['count']; $i ++){
-        $this->memberUid[] = $source['memberUid'][$i];
+      $this->memberUid = array();
+      if(isset($source['memberUid'])){
+          for($i = 0 ; $i < $source['memberUid']['count']; $i ++){
+              $this->memberUid[] = $source['memberUid'][$i];
+          }
       }
-    }
   }