Code

Fixed group->application saving. Store category sorting too
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Oct 2007 08:38:24 +0000 (08:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 16 Oct 2007 08:38:24 +0000 (08:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7564 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupApplication.inc

index ff7640e908b4aa0612fd04fbc00cc5c6c75bf33b..b522e62f114ae3c47062591d934bfaaf544b9fe9 100644 (file)
@@ -385,6 +385,8 @@ class appgroup extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    print_a($this);
+
     /* Log view */
     if($this->is_account && !$this->view_logged){
       $this->view_logged = TRUE;
@@ -967,21 +969,25 @@ class appgroup extends plugin
     $this->Categories[""]=""; 
     $this->attrs["gosaMemberApplication"]= array();
     $this->attrs["gosaApplicationParameter"]= array();
+    $cat_id= 0 ;
     foreach($this->Categories as $name => $cats){
       $i =0;
       if(isset($this->gosaMemberApplication[$name])){
         foreach($this->gosaMemberApplication[$name] as $entry){
           if(!preg_match("/__SEPARATOR__/",$entry['App'])){
             $this->attrs["gosaMemberApplication"][]= $entry['App']."|".$name."|".$i;
+            $i ++;
           }
-          $i ++;
         }
       }
       if(($i==0)&&(!empty($name))){
-        $this->attrs["gosaMemberApplication"][]= "|".$name."|".$i;
+        $this->attrs["gosaMemberApplication"][]= "|".$name."|".$cat_id;
       }
+      $cat_id++;
     }
 
+
+
     /* Are there application parameters to be saved */
     $this->attrs['gosaApplicationParameter']= array();
     foreach($this->appoption as $name => $value){