Code

Added system filter
[gosa.git] / gosa-plugins / systems / admin / systems / tabs_component.inc
index c883831827dcb36e66e1a6e65e629d9dc3ef7ae9..5dfc787ccf7b029404c4fe6163534fee7559b9b5 100644 (file)
@@ -23,9 +23,9 @@
 class componenttabs extends tabs
 {
 
-  function componenttabs($config, $data, $dn,$category)
+  function componenttabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE)
   {
-    tabs::tabs($config, $data, $dn,$category);
+    tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls);
 
     /* Add references/acls/snapshots */
     $this->addSpecialTabs();
@@ -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){