Code

Added dep filter
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Mar 2010 14:48:04 +0000 (14:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 17 Mar 2010 14:48:04 +0000 (14:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16784 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_filterDEPARTMENT.inc [new file with mode: 0644]

diff --git a/gosa-core/plugins/admin/departments/class_filterDEPARTMENT.inc b/gosa-core/plugins/admin/departments/class_filterDEPARTMENT.inc
new file mode 100644 (file)
index 0000000..024b3ae
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+class filterDEPARTMENT {
+
+  static function query($base, $scope, $filter, $attributes, $category, $objectStorage= array(""))
+  {
+    $config= session::global_get('config');
+    $ldap= $config->get_ldap_link(TRUE);
+
+    $result = array();
+    $flag= ($scope == "sub")?GL_SUBSEARCH:0;
+    if(!($flag & GL_SUBSEARCH)){
+      $ldap->cat($base);
+      $result[] = $ldap->fetch();
+    }
+
+    $result= array_merge($result,filterLDAP::get_list($base, $filter, $attributes, $category, $objectStorage, $flag | GL_SIZELIMIT));
+    return $result;
+  }
+}
+
+?>