diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index 24c3f9a9cccf9e06a7d8b09cd5886566c7512756..37e4aef73e76c6ffa502a8d1a1f0d2edcc66ab1a 100644 (file)
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
- if(!preg_match("/,ou=incoming,/",$attrs['dn'])){
+ if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,ou=incoming,/",$attrs['dn']) && preg_match("/,ou=servers,ou=systems,/",$attrs['dn'])){
$message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
break;
}
/* cn is not case sensitive for ldap, but for php it is!! */
if($this->config->current['DNMODE'] == "cn"){
if (strtolower($this->orig_dn) != (strtolower($this->dn))){
- $this->move($this->orig_dn, $this->dn);
+ $this->recursive_move($this->orig_dn, $this->dn);
plugin::save();
}
}else{
if ($this->orig_dn != $this->dn){
- $this->move($this->orig_dn, $this->dn);
+ $this->recursive_move($this->orig_dn, $this->dn);
plugin::save();
}
}