Code

Migrated to get_cfg_value
[gosa.git] / gosa-core / include / class_ldap.inc
index 7ff9cb8ac683143b11af81e96b243da7c28c44be..1aaa8e800c557389bb2888cd22edbfe0a93dc820 100644 (file)
@@ -60,8 +60,8 @@ class LDAP{
     $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($config->get_cfg_value("max_ldap_query_time") != ""){
+      $str = $config->get_cfg_value("max_ldap_query_time");
       $this->max_ldap_query_time = (float)($str);
     }
 
@@ -451,6 +451,9 @@ class LDAP{
    */
   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.");
@@ -1192,7 +1195,7 @@ class LDAP{
 
     /* 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("schema_check") != "true"){
         return($objectclasses);
       } 
     }