Code

Updated OPSI spelling
[gosa.git] / gosa-plugins / systems / admin / systems / tabs_component.inc
index c883831827dcb36e66e1a6e65e629d9dc3ef7ae9..dc0d743b07e53be2bedfb2e65625014d8eabc50b 100644 (file)
@@ -45,7 +45,15 @@ class componenttabs extends tabs
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
     $baseobject= $this->by_object['componentGeneric'];
-    $this->dn= "cn=$baseobject->cn,".get_ou('componentou').$baseobject->base;
+    $this->dn= "cn=$baseobject->cn,".get_ou('componentRDN').$baseobject->base;
+
+    if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
+
+      /* Udpate acls */
+      $baseobject->update_acls($baseobject->orig_dn,$this->dn);
+      $baseobject->move($baseobject->orig_dn,$this->dn);
+    }
+
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){