Code

Applied fix for posixGroups != posixGroup.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Nov 2009 08:15:21 +0000 (08:15 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Nov 2009 08:15:21 +0000 (08:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14835 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_plugin.inc

index e579bb2b94f60e3a0515409b77df7334ab59cdfd..38bd1cf9436b30d4807e6da09edfad3870b10d9d 100644 (file)
@@ -987,7 +987,9 @@ class plugin
     foreach($ogroups as $ogroup){
       // Migrate old to new dn
       $o_ogroup= new ogroup($this->config,$ogroup['dn']);
-      unset($o_ogroup->member[$src_dn]);
+      if (isset($o_group->member[$src_dn])) {
+        unset($o_ogroup->member[$src_dn]);
+      }
       $o_ogroup->member[$dst_dn]= $dst_dn;
       
       // Save object group
@@ -995,13 +997,15 @@ class plugin
     }
 
     // Migrate rfc groups if needed
-    $groups = get_sub_list("(&(objectClass=posixGroups)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
+    $groups = get_sub_list("(&(objectClass=posixGroup)(member=".LDAP::prepare4filter(LDAP::fix($src_dn))."))","groups", array(get_ou("groupRDN")),$this->config->current['BASE'],array("dn"), GL_SUBSEARCH | GL_NO_ACL_CHECK);
 
     // Walk through all POSIX groups
     foreach($groups as $group){
       // Migrate old to new dn
       $o_group= new group($this->config,$group['dn']);
-      unset($o_group->member[$src_dn]);
+      if (isset($o_group->member[$src_dn])) {
+        unset($o_group->member[$src_dn]);
+      }
       $o_group->member[$dst_dn]= $dst_dn;
       
       // Save object group