Code

Large translation update
[gosa.git] / plugins / admin / systems / tabs_printers.inc
index a1e85ebb691aec55f2e8a3eac849594bf46a46b8..2fe1c65db90bc5a40f52a5816ce33ec71af6b6c7 100644 (file)
@@ -5,7 +5,25 @@ class printtabs extends tabs
 
   function printtabs($config, $data, $dn)
   {
-    tabs::tabs($config, $data, $dn);
+    /* Save dn */
+    $this->dn= $dn;
+    $this->config= $config;
+
+    foreach ($data as $tab){
+      if($tab['CLASS'] == "printgeneric"){
+        $this->by_name[$tab['CLASS']]= $tab['NAME'];
+        $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn,$this);
+        $this->by_object[$tab['CLASS']]->parent= &$this;
+      }else{
+        $this->by_name[$tab['CLASS']]= $tab['NAME'];
+        $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn);
+        $this->by_object[$tab['CLASS']]->parent= &$this;
+      }
+      /* Initialize current */
+      if ($this->current == ""){
+        $this->current= $tab['CLASS'];
+      }
+    }
   }
 
   function save_object($save_current= FALSE)
@@ -25,7 +43,10 @@ class printtabs extends tabs
       $this->by_object[$key]->dn= $this->dn;
     }
 
-    tabs::save(TRUE);
+    tabs::save(FALSE);
+
+    /* Fix tagging if needed */
+    $baseobject->handle_object_tagging();
   }
 
 }