From 87128a9fccb32b389186dde0e429db90441181c9 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 11 Jan 2006 09:37:08 +0000 Subject: [PATCH] Added multi deletion for hooks git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2442 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiHook.inc | 17 ++++++++++------- plugins/admin/fai/faiHook.tpl | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index bfea1e7b2..aaf7f74e0 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -112,18 +112,22 @@ class faiHook extends plugin } /* Edit selected Sub Object */ if((isset($_POST['EditSubObject']))&&(isset($_POST['SubObject']))){ - $this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$_POST['SubObject']]); + $hook = $_POST['SubObject'][0]; + + $this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$hook]); $this->dialog->parent = &$this; - $_SESSION['objectinfo'] = $this->SubObjects[$_POST['SubObject']]['dn']; + $_SESSION['objectinfo'] = $this->SubObjects[$hook]['dn']; $this->is_dialog=true; } /* Remove Sub object */ if((isset($_POST['DelSubObject']))&&(isset($_POST['SubObject']))){ - if($this->SubObjects[$_POST['SubObject']]['status'] == "edited"){ - $this->SubObjects[$_POST['SubObject']]['status']= "delete"; - }else{ - unset($this->SubObjects[$_POST['SubObject']]); + foreach($_POST['SubObject'] as $hook){ + if($this->SubObjects[$hook]['status'] == "edited"){ + $this->SubObjects[$hook]['status']= "delete"; + }else{ + unset($this->SubObjects[$hook]); + } } } @@ -204,7 +208,6 @@ class faiHook extends plugin } } - $display.= $smarty->fetch(get_template_path('faiHook.tpl', TRUE)); return($display); } diff --git a/plugins/admin/fai/faiHook.tpl b/plugins/admin/fai/faiHook.tpl index 0e8b9fa36..eb9ea7f6a 100644 --- a/plugins/admin/fai/faiHook.tpl +++ b/plugins/admin/fai/faiHook.tpl @@ -37,7 +37,7 @@
- {html_options values=$SubObjectKeys output=$SubObjects}
-- 2.30.2