Code

Fixed problem with moving groups that have a mail account.
[gosa.git] / plugins / admin / groups / class_groupGeneric.inc
index e1a3ca488d8372fc77b2e5511bc386fbef70c19b..588c842c88c6e81599fc153bbfa3de05102fd2e6 100644 (file)
@@ -41,13 +41,15 @@ class group extends plugin
 
   var $allowGroupsWithSameNameInOtherSubtrees = true;
 
+  var $CopyPasteVars          = array("force_gid","fon_group","smbgroup","groupType","sambaSID","sambaDomainName","SID","nagios_group","sambaGroupType");
+
   /* attribute list for save action */
   var $attributes= array("cn", "description", "gidNumber","memberUid","sambaGroupType","sambaSID");
   var $objectclasses= array("top", "posixGroup");
 
-  function group ($config, $dn= NULL)
+  function group ($config, $dn= NULL, $parent= NULL)
   {
-    plugin::plugin ($config, $dn);
+    plugin::plugin ($config, $dn, $parent);
 
     /* Load attributes depending on the samba version */
     $this->samba3= ($config->current['SAMBAVERSION'] == 3);
@@ -155,7 +157,9 @@ class group extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
+
+      /* Get object base */
+      $this->base =preg_replace ("/^[^,]+,".normalizePreg(get_groups_ou())."/","",$this->dn);
     }
 
     /* This is always an account */