Code

Udpated tab re_init
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 May 2008 09:54:03 +0000 (09:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 May 2008 09:54:03 +0000 (09:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10914 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/tabs_printers.inc
gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc
gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc

index a6985094e90562ab3f9d6aea05fc698954326a51..1f32207dcd58f7e0d0cd77417275906e802326ca 100644 (file)
@@ -35,6 +35,29 @@ class printtabs extends tabs
     $this->addSpecialTabs();
   }
 
+
+  /*! \brief Reinitializes the tab classes with fresh ldap values.
+    This maybe usefull if for example the apply button was pressed.
+   */
+  function re_init()
+  {
+    $baseobject= NULL;
+    foreach($this->by_object as $name => $object){
+      $class = get_class($object);
+      if(in_array($class,array("reference","acl"))) continue;
+      if ($baseobject === NULL){
+        $baseobject= new $class($this->config, $this->dn,NULL,$this);
+        $baseobject->enable_CSN_check();
+        $this->by_object[$name]= $baseobject;
+      } else {
+        $this->by_object[$name]= new $class($this->config, $this->dn, $baseobject,$this);
+      }
+      $this->by_object[$name]->parent= &$this;
+      $this->by_object[$name]->set_acl_category($this->acl_category);
+    }
+  }
+
+
   function save_object($save_current= FALSE)
   {
     tabs::save_object($save_current);
index f7cb52b3b56f6732038ecad7a51106461be71269..36da21ae186e9849e4fbb9079239fb6d85d904a2 100644 (file)
@@ -34,6 +34,29 @@ class termtabs extends tabs
     $this->addSpecialTabs();
   }
 
+
+  /*! \brief Reinitializes the tab classes with fresh ldap values.
+    This maybe usefull if for example the apply button was pressed.
+   */
+  function re_init()
+  {
+    $baseobject= NULL;
+    foreach($this->by_object as $name => $object){
+      $class = get_class($object);
+      if(in_array($class,array("reference","acl"))) continue;
+      if ($baseobject === NULL){
+        $baseobject= new $class($this->config, $this->dn,NULL,$this);
+        $baseobject->enable_CSN_check();
+        $this->by_object[$name]= $baseobject;
+      } else {
+        $this->by_object[$name]= new $class($this->config, $this->dn, $baseobject,$this);
+      }
+      $this->by_object[$name]->parent= &$this;
+      $this->by_object[$name]->set_acl_category($this->acl_category);
+    }
+  }
+
+
   function save_object($save_current= FALSE)
   {
     tabs::save_object($save_current);
index 4700f83042274d7c716f06a26178fc9f52a5bb9e..e4c792415dcfa84d0ff52e2312ef8d69ab6c73a7 100644 (file)
@@ -35,6 +35,29 @@ class worktabs extends tabs
     $this->addSpecialTabs();
   }
 
+
+  /*! \brief Reinitializes the tab classes with fresh ldap values.
+    This maybe usefull if for example the apply button was pressed.
+   */
+  function re_init()
+  {
+    $baseobject= NULL;
+    foreach($this->by_object as $name => $object){
+      $class = get_class($object);
+      if(in_array($class,array("reference","acl"))) continue;
+      if ($baseobject === NULL){
+        $baseobject= new $class($this->config, $this->dn,NULL,$this);
+        $baseobject->enable_CSN_check();
+        $this->by_object[$name]= $baseobject;
+      } else {
+        $this->by_object[$name]= new $class($this->config, $this->dn, $baseobject,$this);
+      }
+      $this->by_object[$name]->parent= &$this;
+      $this->by_object[$name]->set_acl_category($this->acl_category);
+    }
+  }
+
+
   function save_object($save_current= FALSE)
   {
     tabs::save_object($save_current);