X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_ldap.inc;h=21fc089307554f4e25d9449088097a3e13ed8ec9;hb=5eb351d44a10e1315cba393a894348906934e06b;hp=c34036c32bbfe61ff5a123c3985a403bd468ec91;hpb=9c309d6fc3d3ff65caf535b6f53ea3177433d29b;p=gosa.git diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index c34036c32..21fc08930 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -60,8 +60,8 @@ class LDAP{ $this->hostname=$hostname; /* Check if MAX_LDAP_QUERY_TIME is defined */ - if(is_object($config) && $config->get_cfg_value("ldapMaxQueryTime") != ""){ - $str = $config->get_cfg_value("ldapMaxQueryTime"); + if(is_object($config) && $config->get_cfg_value("core","ldapMaxQueryTime") != ""){ + $str = $config->get_cfg_value("core","ldapMaxQueryTime"); $this->max_ldap_query_time = (float)($str); } @@ -874,9 +874,11 @@ class LDAP{ $pwd = escapeshellarg($this->bindpw); $filter = escapeshellarg($filter); $host = escapeshellarg($this->hostname); - $cmd = "ldapsearch -x -LLLL -D {$admin} -w {$pwd} {$filter} {$limit} {$scope} -H {$host} -b {$dn} $attrs"; - exec($cmd, $ret,$code); - $res = implode($ret,"\n"); + $cmd = "ldapsearch -x -LLLL -D {$admin} -w {$pwd} {$filter} {$limit} {$scope} -H {$host} -b {$dn} $attrs "; + ob_start(); + passthru($cmd); + $res=ob_get_contents(); + ob_end_clean(); return($res); } @@ -1204,7 +1206,7 @@ class LDAP{ /* Only read schema if it is allowed */ if(isset($config) && preg_match("/config/i",get_class($config))){ - if ($config->get_cfg_value("schemaCheck") != "true"){ + if ($config->get_cfg_value("core","schemaCheck") != "true"){ return($objectclasses); } }