Code

Added initial (Not finished image creation ... )
[gosa.git] / plugins / admin / systems / tabs_printers.inc
index d06c98e26e8168cbf6723fbaf8b0c61cb9aae996..0fbbccc222005f837dc571db50c45f4bc3d6652d 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)
@@ -20,12 +38,16 @@ class printtabs extends tabs
        'dn' to all plugins */
     $baseobject= $this->by_object['printgeneric'];
     $this->dn= "cn=$baseobject->cn,ou=printers,ou=systems,".$baseobject->base;
+    $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){
       $this->by_object[$key]->dn= $this->dn;
     }
 
     tabs::save(FALSE);
+
+    /* Fix tagging if needed */
+    $baseobject->handle_object_tagging();
   }
 
 }