Code

Updated group Application.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Mar 2008 13:11:10 +0000 (13:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Mar 2008 13:11:10 +0000 (13:11 +0000)
-Fixed saving for tagged entries.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10090 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc

index d55a09f338b3a3221b0fd20b573b9b1aae0539c8..4a3e50076c10cc67b1d6d4a3268a9a44af8a3053 100644 (file)
@@ -242,6 +242,7 @@ class appgroup extends plugin
             }
           }
 
+          $data['LDAP_ATTRS'] = $attrs;
           $data['DN']       = $attrs['dn'];
           $data['NAME']     = $name;
           $data['TYPE']     = $type;
@@ -1046,10 +1047,11 @@ class appgroup extends plugin
       $cur_dn = $dn.$this->dn;
 
       $attrs = array();
+
       switch($entry['TYPE']){
         case "SEPERATOR"    :
         { 
-          $attrs['objectClass'] = "gotoMenuEntry";
+          $attrs['objectClass'] = array("gotoMenuEntry");
           $attrs['cn']          = "seperator_".$sep_id;
           $attrs['gosaApplicationPriority'] = $prio;
           $attrs['gosaApplicationParameter'] = "*separator*";
@@ -1057,7 +1059,7 @@ class appgroup extends plugin
         break;
         case "ENTRY"    :
         { 
-          $attrs['objectClass'] = "gotoMenuEntry";
+          $attrs['objectClass'] = array("gotoMenuEntry");
           $attrs['cn']          = $entry['NAME'];
           $attrs['gosaApplicationPriority'] = $prio;
           $attrs['gosaApplicationParameter'] = array(); 
@@ -1073,7 +1075,7 @@ class appgroup extends plugin
         break;
         case "FOLDER"   : 
         { 
-          $attrs['objectClass'] = "gotoSubmenuEntry";
+          $attrs['objectClass'] = array("gotoSubmenuEntry");
           $attrs['cn']          = $entry['NAME'];
           $attrs['gosaApplicationPriority'] = $prio;
           if($entry['STATUS'] != "ADDED"){
@@ -1086,7 +1088,7 @@ class appgroup extends plugin
         }
         break;
         case "RELEASE"  : 
-        { 
+        {
           $attrs['ou']            = $entry['NAME'];
           $attrs['objectClass']   = array();
           $attrs['objectClass'][] = "top";
@@ -1098,7 +1100,17 @@ class appgroup extends plugin
         }
         break;
       }
-  
+      /* Append missing ObjectClasses,  ...  Tagging */
+      if(isset($entry['LDAP_ATTRS'])){
+        for($i = 0 ; $i < $entry['LDAP_ATTRS']['objectClass']['count']; $i ++){
+          $oc = $entry['LDAP_ATTRS']['objectClass'][$i];
+          if(!in_array($oc,$attrs['objectClass'])){
+            $attrs['objectClass'][] = $oc;
+          }
+        }
+      }
       if($entry['STATUS'] == "LOADED"){
         continue;
       }