Code

Added subtree search to selectUserToPrinter
[gosa.git] / plugins / admin / systems / tabs_terminal.inc
index 5f5e47eea73c66a797388caf6ad1245446d9e24a..cac248e2ec5f80e7b5a332908440beddba8d9573 100644 (file)
@@ -31,8 +31,16 @@ class termtabs extends tabs
     tabs::save_object($save_current);
 
     /* Update reference, transfer variables */
-    $this->by_object['termstartup']->gotoTerminalPath=
-      $this->by_object['termgeneric']->gotoTerminalPath;
+    if(isset($this->by_object['termstartup'])){
+      $this->by_object['termstartup']->gotoTerminalPath=
+        $this->by_object['termgeneric']->gotoTerminalPath;
+    }
+   
+    /* Assign current cn to all other plugins */ 
+    $baseobject= $this->by_object['termgeneric'];
+    foreach ($this->by_object as $key => $obj){
+      $this->by_object[$key]->cn= $baseobject->cn;
+    }
   }
 
 
@@ -42,6 +50,7 @@ class termtabs extends tabs
        'dn' to all plugins */
     $baseobject= $this->by_object['termgeneric'];
     $this->dn= "cn=".$baseobject->cn.",ou=terminals,ou=systems,".$baseobject->base;
+    $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){
       $this->by_object[$key]->dn= $this->dn;
@@ -49,10 +58,14 @@ class termtabs extends tabs
     }
 
     tabs::save(TRUE);
-    if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){
-      $this->by_object['printgeneric']->remove_from_parent();
+    if(isset($this->by_object['printgeneric'])){
+      if(($this->by_object['printgeneric']->is_account==false)&&($this->by_object['printgeneric']->initially_was_account==true)){
+        $this->by_object['printgeneric']->remove_from_parent();
+      }
     }
 
+    /* Fix tagging if needed */
+    $baseobject->handle_object_tagging();
   }
 
 }