From 2c21e5446fccc0062e13d614e8136639e1fe16c1 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 21 Oct 2005 07:39:07 +0000 Subject: [PATCH] Fixed renaming of servers git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1646 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servGeneric.inc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 1b9a87116..c8198c41b 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -214,11 +214,20 @@ class servgeneric extends plugin $ldap->add($this->attrs); $mode= "add"; } else { - if ($this->orig_dn != $this->dn){ - $this->move($this->orig_dn, $this->dn); - plugin::save(); + + /* 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); + plugin::save(); + } + }else{ + if ($this->orig_dn != $this->dn){ + $this->move($this->orig_dn, $this->dn); + plugin::save(); + } } - + $ldap->cd($this->dn); $ldap->modify($this->attrs); $mode= "modify"; -- 2.30.2