Code

Updated tabs, to re_init correctly
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 May 2008 09:53:43 +0000 (09:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 15 May 2008 09:53:43 +0000 (09:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10913 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/tabs_server.inc

index dfe14489d08b7833553032dd0037f46ad510023b..63a1a9545c40bef7eb8daa39f4950ea394495b23 100644 (file)
@@ -54,6 +54,29 @@ class servtabs 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);