Code

Display fixes
[gosa.git] / gosa-core / include / class_filterLDAP.inc
old mode 100755 (executable)
new mode 100644 (file)
index 12983d7..222225b
@@ -4,15 +4,8 @@ class filterLDAP {
 
   static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "", $objectBase= "")
   {
-    global $config;
-
-    echo "Base: $base<br>";
-    echo "Scope: $scope<br>";
-    echo "filter: $filter<br>";
-    print_a($attributes);
-
+    $config= session::global_get('config');
     $ldap= $config->get_ldap_link(TRUE);
-
     $result= filterLDAP::get_list($base, $scope, $filter, $attributes,
                                   $category, $objectStorage, $objectBase,
                                   GL_SUBSEARCH | GL_SIZELIMIT);
@@ -23,7 +16,8 @@ class filterLDAP {
   static function get_list($base, $scope, $filter, $attributes, $category,
                            $objectStorage= array(), $objectBase= "", $flags= GL_SUBSEARCH)
   {
-    global $config, $ui;
+    $config= session::global_get('config');
+    $ui= session::global_get('ui');
     $departments= array();
 
     /* Get LDAP link */
@@ -173,7 +167,8 @@ class filterLDAP {
 
   function get_list_old($filter, $category, $base= "", $attributes= array(), $flags= GL_SUBSEARCH)
   {
-    global $config, $ui;
+    $config= session::global_get('config');
+    $ui= session::global_get('ui');
   
     /* Get LDAP link */
     $ldap= $config->get_ldap_link($flags & GL_SIZELIMIT);
@@ -228,7 +223,6 @@ class filterLDAP {
         }
       }
     }
-  
     return ($result);
   }