From 4b94a526fb1697dd068f6aa7a716ee2f0271fe15 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 20 Nov 2007 10:30:07 +0000 Subject: [PATCH] Enabled FAI summary for server git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7821 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiSummaryTab.inc | 2 ++ plugins/admin/systems/tabs_server.inc | 25 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/plugins/admin/fai/class_faiSummaryTab.inc b/plugins/admin/fai/class_faiSummaryTab.inc index 62ba967a9..540d51115 100644 --- a/plugins/admin/fai/class_faiSummaryTab.inc +++ b/plugins/admin/fai/class_faiSummaryTab.inc @@ -82,6 +82,8 @@ class faiSummaryTab extends plugin{ $this->base = $this->parent->by_object['workgeneric']->base; }elseif(isset($this->parent->by_object['ogroup'])){ $this->base = $this->parent->by_object['ogroup']->base; + }elseif(isset($this->parent->by_object['servgeneric'])){ + $this->base = $this->parent->by_object['servgeneric']->base; }else{ print_red(_("Unknown type of FAI source information. This is not a profile, workstation nor a ogroup.")); } diff --git a/plugins/admin/systems/tabs_server.inc b/plugins/admin/systems/tabs_server.inc index e9cae2eda..564e92588 100644 --- a/plugins/admin/systems/tabs_server.inc +++ b/plugins/admin/systems/tabs_server.inc @@ -5,7 +5,30 @@ class servtabs extends tabs function servtabs($config, $data, $dn,$category) { - tabs::tabs($config, $data, $dn, $category); + /* Save dn */ + $this->dn= $dn; + $this->config= $config; + + $baseobject= NULL; + + foreach ($data as $tab){ + $this->by_name[$tab['CLASS']]= $tab['NAME']; + + if ($baseobject === NULL){ + $baseobject= new $tab['CLASS']($this->config, $this->dn,NULL,$this); + $this->by_object[$tab['CLASS']]= $baseobject; + } else { + $this->by_object[$tab['CLASS']]= new $tab['CLASS']($this->config, $this->dn, $baseobject,$this); + } + + $this->by_object[$tab['CLASS']]->parent= &$this; + $this->by_object[$tab['CLASS']]->set_acl_category($category); + + /* Initialize current */ + if ($this->current == ""){ + $this->current= $tab['CLASS']; + } + } /* Add references/acls/snapshots */ $this->addSpecialTabs(); -- 2.30.2