From e66af5147d0d019be52c35685f391fa63b02b6d8 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 11 Jan 2006 09:51:22 +0000 Subject: [PATCH] Added multidelete for vars git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2445 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiVariable.inc | 17 +++++++++++------ plugins/admin/fai/faiVariable.tpl | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index 87aab8e73..244c95039 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -95,17 +95,22 @@ class faiVariable 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']; + + $var = $_POST['SubObject'][0]; + + $this->dialog= new $this->subClassName($this->config,$this->dn,$this->SubObjects[$var]); + $_SESSION['objectinfo'] = $this->SubObjects[$var]['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 $var){ + if($this->SubObjects[$var]['status'] == "edited"){ + $this->SubObjects[$var]['status']= "delete"; + }else{ + unset($this->SubObjects[$var]); + } } } diff --git a/plugins/admin/fai/faiVariable.tpl b/plugins/admin/fai/faiVariable.tpl index 90a3d4883..d7ef90216 100644 --- a/plugins/admin/fai/faiVariable.tpl +++ b/plugins/admin/fai/faiVariable.tpl @@ -37,7 +37,7 @@
- {html_options values=$SubObjectKeys output=$SubObjects}
-- 2.30.2