From: hickert Date: Mon, 3 May 2010 06:20:08 +0000 (+0000) Subject: Updated ldap export X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=698faadb3a28c5f15c3391f1bdc91caf10b85905;p=gosa.git Updated ldap export -Optimized output generation - very large ldif couldn't be downloaded. The resulting files were just empty. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18018 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_ldap.inc b/gosa-core/include/class_ldap.inc index c34036c32..f6e908a37 100644 --- a/gosa-core/include/class_ldap.inc +++ b/gosa-core/include/class_ldap.inc @@ -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); }