From 81308b740d848045fb99032e7677f0464be53186 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 7 Sep 2005 12:40:17 +0000 Subject: [PATCH] Some little changes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1315 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/FAI/class_faiManagement.inc | 25 ++++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/plugins/admin/FAI/class_faiManagement.inc b/plugins/admin/FAI/class_faiManagement.inc index 2738653e8..fb6681453 100644 --- a/plugins/admin/FAI/class_faiManagement.inc +++ b/plugins/admin/FAI/class_faiManagement.inc @@ -18,6 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ require "tabsPartition.inc"; +require "tabsScript.inc"; class faiManagement extends plugin { @@ -195,16 +196,13 @@ class faiManagement extends plugin /* Edit Entry */ if($s_action == "edit"){ $entry = $this->objects[$s_entry]; - switch($entry['type']){ - case "FAIpartitionTable" : - $this->dn = $entry['dn']; - $this->dialog= new tabsPartition($this->config, - $this->config->data['TABS']['PARTITIONTABS'],$this->dn); - $this->is_dialog = true; - ;break; - default :;break; - } - + + $a_setup = ( $this->get_type($entry)); + + $this->dn = $entry['dn']; + $this->dialog= new $a_setup[0]($this->config, + $this->config->data['TABS'][$a_setup[2]],$this->dn); + $this->is_dialog = true; } @@ -223,7 +221,7 @@ class faiManagement extends plugin $this->dn = "new" ; $name = $this->dialog->save(); $this->dialog = new tabsPartition($this->config, - $this->config->data['TABS']['PARTITIONTABS'],$this->dn); + $this->config->data['TABS']['FAIPARTITIONTABS'],$this->dn); $this->dialog->by_object['faiPartitionTable']->cn = $name; $this->is_dialog = true; } @@ -502,7 +500,10 @@ class faiManagement extends plugin function get_type($array){ if(in_array("FAIpartitionTable",$array['objectClass'])){ - return(array("tabsPartition","faiPartitionTable","PARTITIONTABS")); + return(array("tabsPartition","faiPartitionTable","FAIPARTITIONTABS")); + } + if(in_array("FAIscript",$array['objectClass'])){ + return(array("tabsScript","faiScript","FAISCRIPTTABS")); } } -- 2.30.2