From 698faadb3a28c5f15c3391f1bdc91caf10b85905 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 3 May 2010 06:20:08 +0000 Subject: [PATCH] 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 --- gosa-core/include/class_ldap.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); } -- 2.30.2