From: hickert Date: Mon, 31 Mar 2008 13:11:10 +0000 (+0000) Subject: Updated group Application. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d47f297e85bac96d3d9503f67948315e03ac6739;p=gosa.git Updated group Application. -Fixed saving for tagged entries. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10090 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc index d55a09f33..4a3e50076 100644 --- a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc +++ b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc @@ -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; }