From: hickert Date: Thu, 15 May 2008 09:54:03 +0000 (+0000) Subject: Udpated tab re_init X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=34ea2fc39b60a633b3bcf64638087981972e48ed;p=gosa.git Udpated tab re_init git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10914 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc index a6985094e..1f32207dc 100644 --- a/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc +++ b/gosa-plugins/goto/admin/systems/goto/tabs_printers.inc @@ -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); diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc b/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc index f7cb52b3b..36da21ae1 100644 --- a/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc +++ b/gosa-plugins/goto/admin/systems/goto/tabs_terminal.inc @@ -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); diff --git a/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc b/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc index 4700f8304..e4c792415 100644 --- a/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc +++ b/gosa-plugins/goto/admin/systems/goto/tabs_workstation.inc @@ -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);