Code

Fixed problem with groupApps, all over 10 entries were deleted
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Feb 2006 11:50:49 +0000 (11:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 20 Feb 2006 11:50:49 +0000 (11:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2704 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupApplication.inc

index 51b37e3ab67dc301bc29ad924dc1d571a7222078..fd3500a8602dd1a970fe3544ac4df108a91b6bee 100644 (file)
@@ -649,19 +649,18 @@ $ldap->modify ($this->attrs);
     /* Copy members */
     $this->Categories[""]=""; 
     $this->attrs["gosaMemberApplication"]= array();
-    $cats = array();
     foreach($this->Categories as $name => $cats){
-      $cats[$name] =0;
+      $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."|".$cats[$name];
+            $this->attrs["gosaMemberApplication"][]= $entry['App']."|".$name."|".$i;
           }
-          $cats[$name] = $cats[$name] + 1;
+          $i ++;
         }
       }
-      if(($cats[$name]==0)&&(!empty($name))){
-        $this->attrs["gosaMemberApplication"][]= "|".$name."|".$cats[$name];
+      if(($i==0)&&(!empty($name))){
+        $this->attrs["gosaMemberApplication"][]= "|".$name."|".$i;
       }
     }