Code

Updated post handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Jul 2010 10:15:36 +0000 (10:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 29 Jul 2010 10:15:36 +0000 (10:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19206 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 2176ca9a1a884b33066fc8ae70a9855cf20ab636..d5c396b940fc8f504de5e410e3a787cc4e59692d 100644 (file)
@@ -2,51 +2,51 @@
 
 class filterGroupLDAP {
 
-  static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
-  {
-    $result= array();
-    $menu= array();
-    $dn2index= array();
-    $config= session::global_get('config');
-    $ldap= $config->get_ldap_link(TRUE);
-    $flag= ($scope == "sub")?GL_SUBSEARCH:0;
-    $tmp= filterGroupLDAP::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT);
-
-    // Sort out menu entries, but save info
-    $index= 0;
-    foreach ($tmp as $entry) {
-      if (in_array_ics("posixGroup", $entry['objectClass'])) {
-        $result[$index]= $entry;
-        $dn2index[$entry['dn']]= $index;
-        $index++;
-      } else {
-        foreach ($objectStorage as $storage) {
-          $group= preg_replace("/^.*,([^,]+),".preg_quote("$storage$base")."$/", '$1', $entry['dn']);
-          $group= "$group,$storage$base";
-
-          // The current group implementation has no multiple storage settings - so break here
-          break;
+    static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+    {
+        $result= array();
+        $menu= array();
+        $dn2index= array();
+        $config= session::global_get('config');
+        $ldap= $config->get_ldap_link(TRUE);
+        $flag= ($scope == "sub")?GL_SUBSEARCH:0;
+        $tmp= filterGroupLDAP::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT);
+
+        // Sort out menu entries, but save info
+        $index= 0;
+        foreach ($tmp as $entry) {
+            if (in_array_ics("posixGroup", $entry['objectClass'])) {
+                $result[$index]= $entry;
+                $dn2index[$entry['dn']]= $index;
+                $index++;
+            } else {
+                foreach ($objectStorage as $storage) {
+                    $group= preg_replace("/^.*,([^,]+),".preg_quote("$storage$base")."$/", '$1', $entry['dn']);
+                    $group= "$group,$storage$base";
+
+                    // The current group implementation has no multiple storage settings - so break here
+                    break;
+                }
+                $menu[$group]= true;
+            }
         }
-        $menu[$group]= true;
-      }
-    }
 
-    // Move menu information to menu
-    foreach ($menu as $dn => $dummy) {
-      if(isset($dn2index[$dn])){
-        $result[$dn2index[$dn]]["objectClass"][]= "gotoMenuGroup";
-      }
-    }
+        // Move menu information to menu
+        foreach ($menu as $dn => $dummy) {
+            if(isset($dn2index[$dn])){
+                $result[$dn2index[$dn]]["objectClass"][]= "gotoMenuGroup";
+            }
+        }
 
-    return $result;
-  }
+        return $result;
+    }
 
 
-  static function get_list($base, $filter, $attributes, $category, $objectStorage, $flags= GL_SUBSEARCH)
-  {
-    $filter= "(|(|(objectClass=gotoMenuEntry)(objectClass=gotoSubmenuEntry))$filter)";
-    return filterLDAP::get_list($base, $filter, $attributes, $category, $objectStorage, $flags);
-  }
+    static function get_list($base, $filter, $attributes, $category, $objectStorage, $flags= GL_SUBSEARCH)
+    {
+        $filter= "(|(|(objectClass=gotoMenuEntry)(objectClass=gotoSubmenuEntry))$filter)";
+        return filterLDAP::get_list($base, $filter, $attributes, $category, $objectStorage, $flags);
+    }
 
 
 }