index e579bb2b94f60e3a0515409b77df7334ab59cdfd..0691c206073d220480c29269e45c8d395ee68038 100644 (file)
/* FAIvariable=.../..., cn=..
could not be saved, because the attribute FAIvariable was different to
the dn FAIvariable=..., cn=... */
+
+ if(!is_array($new['objectClass'])) $new['objectClass'] = array($new['objectClass']);
+
if(in_array_ics("FAIdebconfInfo",$new['objectClass'])){
$new['FAIvariable'] = $ldap->fix($new['FAIvariable']);
}
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
}
// 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]);
- $o_group->member[$dst_dn]= $dst_dn;
-
- // Save object group
$o_group->save();
}
if (isset($source[$var])){
if(isset($source[$var]['count'])){
if($source[$var]['count'] > 1){
- $this->$var = array();
- $tmp = array();
- for($i = 0 ; $i < $source[$var]['count']; $i++){
- $tmp = $source[$var][$i];
- }
+ $tmp= $source[$var];
+ unset($tmp['count']);
$this->$var = $tmp;
}else{
$this->$var = $source[$var][0];