Code

Updated class ldap
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Dec 2009 08:52:25 +0000 (08:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Dec 2009 08:52:25 +0000 (08:52 +0000)
-Allow to specify an additional search filter for function LDAP::cat.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14951 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_ldap.inc

index 463f6b9e1251fa3461a01ca4a5b2baf592bb0e17..5322abebac63402d8f54001d1f9a75c598fc9277 100644 (file)
@@ -276,13 +276,12 @@ class LDAP{
     }
   }
 
-  function cat($srp, $dn,$attrs= array("*"))
+  function cat($srp, $dn,$attrs= array("*"), $filter = "(objectclass=*)")
   {
     if($this->hascon){
       if ($this->reconnect) $this->connect();
 
       $this->clearResult($srp);
-      $filter = "(objectclass=*)";
       $this->sr[$srp] = @ldap_read($this->cid, LDAP::fix($dn), $filter,$attrs);
       $this->error = @ldap_error($this->cid);
       $this->resetResult($srp);