From 6efb70591e5d1c4a83fe3d481b4c13c99f10e3e6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 11 Jan 2006 09:54:48 +0000 Subject: [PATCH] Added multi deletion git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2446 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiTemplate.inc | 17 +++++++++++------ plugins/admin/fai/faiTemplate.tpl | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index a4017ea8c..cfe0f41e8 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -97,17 +97,22 @@ class faiTemplate 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']]); - $_SESSION['objectinfo'] = $this->SubObjects[$_POST['SubObject']]['dn']; + + $temp = $_POST['SubObject'][0]; + + $this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$temp]); + $_SESSION['objectinfo'] = $this->SubObjects[$temp]['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 $temp){ + if($this->SubObjects[$temp]['status'] == "edited"){ + $this->SubObjects[$temp]['status']= "delete"; + }else{ + unset($this->SubObjects[$temp]); + } } } diff --git a/plugins/admin/fai/faiTemplate.tpl b/plugins/admin/fai/faiTemplate.tpl index e14e993d3..e97b52069 100644 --- a/plugins/admin/fai/faiTemplate.tpl +++ b/plugins/admin/fai/faiTemplate.tpl @@ -34,7 +34,7 @@
- {html_options values=$SubObjectKeys output=$SubObjects}
-- 2.30.2