From: hickert Date: Mon, 13 Aug 2007 05:59:03 +0000 (+0000) Subject: Use recursive_move() instead of move() for server objects, there may be dns settings... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86e5f86636ed4b9ff918a8ebd0fd2f26fb41f0f4;p=gosa.git Use recursive_move() instead of move() for server objects, there may be dns settings that should be copied too. Updated check() for already existing server with given cn. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7042 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 060da024f..fc3a089e6 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -259,7 +259,8 @@ class servgeneric extends plugin if ($ldap->count() != 0){ while ($attrs= $ldap->fetch()){ if ($attrs['dn'] != $this->orig_dn){ - if(!preg_match("/,ou=incoming,/",$attrs['dn'])){ + if(!preg_match("/,ou=incoming,/",$attrs['dn']) && preg_match("/,ou=servers,ou=systems,/",$attrs['dn'])){ + echo $attrs['dn']; $message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn); break; } @@ -303,7 +304,7 @@ class servgeneric extends plugin /* 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{