Code

some fixes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 Nov 2005 12:56:00 +0000 (12:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 Nov 2005 12:56:00 +0000 (12:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1996 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupApplication.inc

index cd62e289eb2d87b8c735234444e93e158e043234..5b42adcde0524569323894690f099e03c798d4dc 100644 (file)
@@ -56,6 +56,8 @@ class appgroup extends plugin
   
     $prios = array();
 
+    $cats = array();
+
     foreach($this->gosaMemberApplication as $memberApp){
       if(preg_match("/\|/i",$memberApp)){
         $tmp = split("\|",$memberApp);
@@ -76,11 +78,18 @@ class appgroup extends plugin
     foreach($cats as $cat ){
       $max = max($prios[$cat]);
       $min = 1;//min($prios[$cat]);  
+      $last = false;
       for($i = $min ; $i < $max ; $i++){
         if(!isset($prios[$cat][$i])){
-          $this->gosaMemberApplication["__SEPARATOR__".$i."|".$cat]['Pri'] = $i;
-          $this->gosaMemberApplication["__SEPARATOR__".$i."|".$cat]['Cat'] = $this->curCatDir;
-          $this->gosaMemberApplication["__SEPARATOR__".$i."|".$cat]['App'] = "__SEPARATOR__".$i;
+          if($last == false){
+            $this->gosaMemberApplication["__SEPARATOR__".$i."|".$cat]['Pri'] = $i;
+            $this->gosaMemberApplication["__SEPARATOR__".$i."|".$cat]['Cat'] = $this->curCatDir;
+            $this->gosaMemberApplication["__SEPARATOR__".$i."|".$cat]['App'] = "__SEPARATOR__".$i;
+          
+            $last = true;
+          }
+        }else{
+          $last = false;
         }
       }
     }
@@ -229,7 +238,7 @@ class appgroup extends plugin
     $this->reload();
     foreach($_POST as $name => $value){
       if(preg_match("/DelApp_/",$name)){
-        $app = preg_replace("/DelApp_/","",$name)
+        $app = $value
         unset($this->used_apps[$app]);
         unset($this->gosaMemberApplication[$app."|".$this->curCatDir]);
       }