index 3c52101f9d979f59f81d45b4684b51e7e75baedd..a83343709f0152189fd65343d6e4a6853ee7f23f 100644 (file)
$this->hostname=$hostname;
/* Check if MAX_LDAP_QUERY_TIME is defined */
- if(isset($config->data['MAIN']['MAX_LDAP_QUERY_TIME'])){
- $str = $config->data['MAIN']['MAX_LDAP_QUERY_TIME'];
+ if(is_object($config) && $config->get_cfg_value("max_ldap_query_time") != ""){
+ $str = $config->get_cfg_value("max_ldap_query_time");
$this->max_ldap_query_time = (float)($str);
}
*/
function rename_dn($source,$dest)
{
+ $source = LDAP::fix($source);
+ $dest = LDAP::fix($dest);
+
/* Check if source and destination are the same entry */
if(strtolower($source) == strtolower($dest)){
trigger_error("Source and destination can't be the same entry.");
/* Only read schema if it is allowed */
if(isset($config) && preg_match("/config/i",get_class($config))){
- if(!isset($config->data['MAIN']['SCHEMA_CHECK']) || !preg_match("/true/i",$config->data['MAIN']['SCHEMA_CHECK'])){
+ if ($config->get_cfg_value("schemaCheck") != "true"){
return($objectclasses);
}
}
}
# 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"));
- }
-
+ $sr = @ldap_read ($this->cid, "", "objectClass=*", array("subschemaSubentry"));
$attr = @ldap_get_entries($this->cid,$sr);
if (!isset($attr[0]['subschemasubentry'][0])){
return array();
if(class_available("session")){
session::set("LDAP_CACHE::get_objectclasses",$objectclasses);
}
+
return $objectclasses;
}