Code

Fixed renaming of servers
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Oct 2005 07:39:07 +0000 (07:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Oct 2005 07:39:07 +0000 (07:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1646 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servGeneric.inc

index 1b9a8711647190677d9076e98bcc039c7a55f4e9..c8198c41bab16245d874cfc73d6c7059bca26d31 100644 (file)
@@ -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";