Code

Added support for comments in divlist
[gosa.git] / plugins / admin / systems / tabs_workstation.inc
index bb5b892a8bb03beccefc975df930e8e561b15b7c..4afdf8333840e5ed56a086f922ff74a80e8e2b58 100644 (file)
@@ -5,12 +5,29 @@ class worktabs extends tabs
 
   function worktabs($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)
   {
-echo "Take care of the l attribute. It needs to be synced in case of workstations.";
     tabs::save_object($save_current);
   }
 
@@ -32,6 +49,8 @@ echo "Take care of the l attribute. It needs to be synced in case of workstation
       $this->by_object['printgeneric']->remove_from_parent();
     }
 
+    /* Fix tagging if needed */
+    $baseobject->handle_object_tagging();
   }
 
 }