Code

Updated autocompletition to use filter
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Aug 2009 16:57:30 +0000 (16:57 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Aug 2009 16:57:30 +0000 (16:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14015 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/autocomplete.php

index 4aaca3bed08195ee1b9d4551027ec3bd2c61c77c..975edd2a477fe6f653a81a7f01997107f129ca95 100644 (file)
@@ -34,21 +34,10 @@ if (!session::global_is_set('ui')){
   exit;
 }
 
-if(isset($_POST['NAME'])){
-
-  /* Get configuration from session */
-  $config= $_SESSION['config'];
-  $ldap= $config->get_ldap_link();
-  $ldap->cd($config->current['BASE']);
-  $n= normalizeLDAP($_POST['NAME']);
-  $ldap->search ("(&(objectClass=gosaAccount)(|(cn=*$n*)(givenName=*$n*)(sn=*$n*)(uid=*$n*)))", array("cn"));
-
-  echo '<ul>';
-  while ($attrs= $ldap->fetch()){
-    echo '<li>'.$attrs['cn'][0].'</li>';
-  }
-  echo '</ul>';
+/* Is there a filter object arround? */
+if (session::is_set("autocomplete")){
+  $filter= session::get("autocomplete");
+  $filter->processAutocomplete();
 }
 
-
 ?>