From: cajus Date: Tue, 24 Nov 2009 08:15:21 +0000 (+0000) Subject: Applied fix for posixGroups != posixGroup. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c44346b1a85f792455ffaae560f17c3f8e4d545f;p=gosa.git Applied fix for posixGroups != posixGroup. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14835 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index e579bb2b9..38bd1cf94 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -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