Code

same for gosa+samba3.schema.
[gosa.git] / include / class_ldap.inc
index 448e85fc9d843de359362c8af54b91a18ec6fa79..b5a5026b0db14e3e5014bc137be276b1c6d93795 100644 (file)
@@ -32,6 +32,8 @@ class LDAP{
   var $referrals= array();
   var $max_ldap_query_time = 0;   // 0, empty or negative values will disable this check 
 
+  var $re = NULL;  
+
   function LDAP($binddn,$bindpw, $hostname, $follow_referral= FALSE, $tls= FALSE)
   {
     global $config;
@@ -96,7 +98,7 @@ class LDAP{
 
   /* Function to fix problematic characters in DN's that are used for search
      requests. I.e. member=....                                               */
-  static function prepare4filter($dn)
+  function prepare4filter($dn)
   {
         return normalizeLdap(preg_replace('/\\\\/', '\\\\\\', @LDAP::fix($dn)));
   }
@@ -193,7 +195,6 @@ class LDAP{
       if ($this->reconnect) $this->connect();
 
       $start = microtime();
-   
       $this->clearResult();
       $this->sr = @ldap_search($this->cid, $this->fix($this->basedn), $filter, $attrs);
       $this->error = @ldap_error($this->cid);
@@ -221,6 +222,7 @@ class LDAP{
   {
     if($this->hascon){
       if ($this->reconnect) $this->connect();
+
       $this->clearResult();
       if ($basedn == "")
         $basedn = $this->basedn;
@@ -255,6 +257,7 @@ class LDAP{
   {
     if($this->hascon){
       if ($this->reconnect) $this->connect();
+
       $start = microtime();
       $this->clearResult();
       $filter = "(objectclass=*)";