From: hickert Date: Thu, 15 May 2008 09:53:43 +0000 (+0000) Subject: Updated tabs, to re_init correctly X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c5b114f7b9703fa25ca21ed2bd3bc97f13909bf4;p=gosa.git Updated tabs, to re_init correctly git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10913 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc index dfe14489d..63a1a9545 100644 --- a/gosa-plugins/systems/admin/systems/tabs_server.inc +++ b/gosa-plugins/systems/admin/systems/tabs_server.inc @@ -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);