Code

Updated get_objectclasses.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Apr 2007 12:38:22 +0000 (12:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 26 Apr 2007 12:38:22 +0000 (12:38 +0000)
Use a second method to gather schema informations

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

include/class_ldap.inc

index b3ae4983b38e7ac0bfd609cd4e391325114fc3b2..911da4b003ab7b5d8ac93f7dcb4556ee7e89a326 100644 (file)
@@ -1188,6 +1188,10 @@ class LDAP{
        
          # Get base to look for schema 
          $sr = @ldap_read ($this->cid, NULL, "objectClass=*", array("subschemaSubentry"));
+    if(!$sr){
+           $sr = @ldap_read ($this->cid, "", "objectClass=*", array("subschemaSubentry"));
+    }
+
          $attr = @ldap_get_entries($this->cid,$sr);
          if (!isset($attr[0]['subschemasubentry'][0])){
            return array();