summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 083faec)
raw | patch | inline | side by side (parent: 083faec)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Sep 2007 06:31:22 +0000 (06:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Sep 2007 06:31:22 +0000 (06:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7416 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/groups/class_groupApplication.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc
index a75676068764540500928df38e508e1372166ada..029f959321ab222c2ca48320b032314b609a3b85 100644 (file)
$this->diffAppsInReleases();
$only_once = false;
+ $once =FALSE;
foreach($_POST as $name => $value){
if((preg_match("/AddSep_/",$name))&&(!$only_once)){
}
}
}
-
- if(preg_match("/DelCat_/",$name)){
- $n = preg_replace("/DelCat_/","",$name);
- $app = base64_decode( preg_replace("/_.*$/","",$n));
- foreach($this->Categories as $key => $cat){
- if($cat == $app){
- foreach($this->Categories as $p => $n){
- if(preg_match("/^".$key."\/.*/",$p)){
- unset($this->Categories[$p]);
+
+
+ if(preg_match("/DelCat_/",$name) && !$once){
+ $once =TRUE;
+ $cat = preg_replace("/DelCat_/","",$name);
+ $cat = trim(base64_decode( preg_replace("/_.*$/","",$cat)));
+
+ $free_apps = array();
+
+ if(isset($this->gosaMemberApplication[$cat]) && is_array($this->gosaMemberApplication[$cat])){
+ foreach($this->gosaMemberApplication[$cat] as $app){
+ $free_apps[] = $app['App'];
+ }
+ @unset($this->gosaMemberApplication[$cat]);
+ @unset($this->Categories[$cat]);
+ foreach($this->Categories as $key => $name){
+ if(preg_match("/^".$cat."\/.*/",$key)){
+ foreach($this->gosaMemberApplication[$key] as $app){
+ $free_apps[] = $app['App'];
}
+ @unset($this->gosaMemberApplication[$key]);
+ @unset($this->Categories[$key]);
}
- unset($this->Categories[$key]);
+ }
+ }
+ foreach($free_apps as $app){
+ if(isset($this->used_apps[$app])){
+ unset($this->used_apps[$app]);
}
}
}