From 811d2d496bb582869e83487303ef7743c3e766e0 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 30 May 2006 12:11:31 +0000 Subject: [PATCH] Added parameter remove for mgroup apps git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3563 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/groups/class_groupApplication.inc | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 8644c88b0..80839ce16 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -371,7 +371,6 @@ class appgroup extends plugin /* Call parent execute */ plugin::execute(); - if((isset($_GET['act']))&&($_GET['act']=="depopen")){ $dep = base64_decode($_GET['depid']); if(isset($this->config->idepartments[$dep])){ @@ -455,9 +454,15 @@ class appgroup extends plugin foreach($this->gosaMemberApplication as $key => $cat){ foreach($cat as $key2 => $app){ + if($app['App'] == $val){ unset($this->gosaMemberApplication[$key][$key2]); if(isset($this->used_apps[$val])){ + foreach($this->getParameters($val) as $para){ + if(isset($this->appoption[$para])){ + unset($this->appoption[$para]); + } + } unset($this->used_apps[$val]); } } @@ -999,6 +1004,27 @@ class appgroup extends plugin $this->is_modified= TRUE; } + function getParameters($app) + { + $tmp = $this->getReleases(); + $ret = array(); + if(in_array($this->FAIrelease,$tmp)){ + $tmp2 = array_flip($tmp); + $base = $tmp2[$this->FAIrelease]; + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->search("(&(objectClass=gosaApplication)(cn=".$app.")(gosaApplicationParameter=*))",array("gosaApplicationParameter")); + if($ldap->count()){ + $attrs = $ldap->fetch(); + for($i = 0 ; $i < $attrs['gosaApplicationParameter']['count'] ; $i ++ ){ + $name = preg_replace("/:.*$/","",$attrs['gosaApplicationParameter'][$i]); + $ret[$name] = $name; + } + } + } + return($ret); + } + function GetSubdirs($dir) { $ret = array(); -- 2.30.2