Code

Fixed group application-groupĆ¼ detection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 Apr 2008 13:44:09 +0000 (13:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 Apr 2008 13:44:09 +0000 (13:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10591 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/groups/class_divListGroup.inc

index 4c4fa2c906ae27bc849a9e3d7566a8a3c0aa72a3..119d6be696384b1901af8a3c571b914832fd5936 100644 (file)
@@ -278,6 +278,16 @@ class divListGroup extends MultiSelectWindow
 
     $ui = get_userinfo();
 
+    /* Fetch all application menu entries 
+     */
+    $base = get_groups_ou().$this->selectedBase;
+    $res = get_list("(objectClass=gotoMenuEntry)","application",$base,array("dn"));
+    $configured_apps = array();
+    foreach($res as $entry){
+      $dn = preg_replace("/^.*(cn=[^,]+,".normalizePreg(get_groups_ou()).")/","\\1",$entry['dn']);
+      $configured_apps[$dn] = $dn;
+    }
+
     // Test Every Entry and generate divlist Array
     foreach($groups as $key => $val){
     
@@ -314,11 +324,14 @@ class divListGroup extends MultiSelectWindow
         if(in_array("posixGroup",           $val['objectClass']))   $posix = $posiximg;
         if(in_array("gosaMailAccount",      $val['objectClass']))   $mail  = $mailimg;
         if(in_array("sambaGroupMapping",    $val['objectClass']))   $samba = $sambaimg;
-        if(in_array("gosaApplicationGroup", $val['objectClass']))   $appl  = $applimg;
         if(in_array("goFonPickupGroup",     $val['objectClass']))   $phone = $phoneimg;
         if(in_array("gotoEnvironment",      $val['objectClass']))   $enviro= $envimg;
       }
 
+      if(isset($configured_apps[$val['dn']])){
+          $appl  = $applimg;
+      }
+
       $title = "title='".preg_replace('/ /', '&nbsp;', @LDAP::fix($val['dn']))."'";
 
       if(!isset($val['description'][0])){