Code

Updated servergeneric
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 13:25:39 +0000 (13:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 13:25:39 +0000 (13:25 +0000)
-Server move will now be done in the tab object.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10325 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_servGeneric.inc
gosa-plugins/systems/admin/systems/tabs_server.inc

index 37445077785644a10b92dec83d7cc0b9afc649c3..02f6106a30c7e8e1c55361f5c302266494a7e283 100644 (file)
@@ -364,19 +364,6 @@ class servgeneric extends plugin
       new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
       $mode= "add";
     } else {
-   
-      /* 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->recursive_move($this->orig_dn, $this->dn);
-          plugin::save();
-        }
-      }else{
-        if ($this->orig_dn != $this->dn){
-          $this->recursive_move($this->orig_dn, $this->dn);
-          plugin::save();
-        }
-      }
   
       $ldap->cd($this->dn);
       $this->cleanup();
index 4255ae711441f48a4d7d2131a9fa32c052847234..dfe14489d08b7833553032dd0037f46ad510023b 100644 (file)
@@ -69,6 +69,20 @@ class servtabs extends tabs
        'dn' to all plugins */
     $baseobject= $this->by_object['servgeneric'];
     $this->dn= "cn=$baseobject->cn,".get_ou('serverou').$baseobject->base;
+
+    /* cn is not case sensitive for ldap, but for php it is!! */
+    if($baseobject->orig_dn != "new"){
+      if($this->config->current['DNMODE'] == "cn"){
+        if (strtolower($baseobject->orig_dn) != (strtolower($this->dn))){
+          $baseobject->recursive_move($baseobject->orig_dn, $this->dn);
+        }
+      }else{
+        if ($baseobject->orig_dn != $this->dn){
+          $baseobject->recursive_move($baseobject->orig_dn, $this->dn);
+        }
+      }
+    }
+
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){