From 677ba39387d9dc252022a749309eefe22877e9b4 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 30 Mar 2010 09:26:07 +0000 Subject: [PATCH] Fixed script listing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17384 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/fai/admin/fai/class_faiScript.inc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index eb313dd96..e29091b92 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -72,7 +72,7 @@ class faiScript extends plugin $this->ui = get_userinfo(); - $this->scriptListWidget= new sortableListing($this->SubObjects, $this->convertList()); + $this->scriptListWidget= new sortableListing($this->convertList(TRUE), $this->convertList()); $this->scriptListWidget->setDeleteable(true); $this->scriptListWidget->setInstantDelete(false); $this->scriptListWidget->setEditable(true); @@ -81,12 +81,16 @@ class faiScript extends plugin $this->scriptListWidget->setHeader(array(_("Name"),_("Description"))); } - function convertList() + function convertList($type = FALSE) { $data = array(); foreach($this->SubObjects as $cn => $entry){ if($entry['status'] == "delete") continue; - $data[$cn] = array('data' => array($entry['cn'], $entry['description'])); + if($type){ + $data[$cn] = $entry; + }else{ + $data[$cn] = array('data' => array($entry['cn'], $entry['description'])); + } } return($data); } @@ -219,7 +223,8 @@ class faiScript extends plugin } } - /* Save the edited entry */ + + /* Save the edited entry */ if(isset($_POST['SaveSubObject'])){ /* Check if there are still errors remaining that must be fixed before saving */ @@ -280,7 +285,7 @@ class faiScript extends plugin return($display); } - $this->scriptListWidget->setListData($this->SubObjects, $this->convertList()); + $this->scriptListWidget->setListData($this->convertList(TRUE), $this->convertList()); $this->scriptListWidget->update(); $smarty->assign("Entry_divlist",$this->scriptListWidget->render()); -- 2.30.2