From 5de144d9622c4f1945b202521e4932db67cbc0b6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 22 Feb 2006 08:29:52 +0000 Subject: [PATCH] Fixed recursive copy, to use binary attributes if possible git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2715 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 11 ++++++++++- include/php_setup.inc | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 4c2b1b498..5368093bb 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -436,13 +436,14 @@ class LDAP{ $attr[$key] = $attr[$key][0]; } } - + if(isset($attr[$key]['count'])){ if(is_array($attr[$key])){ unset($attr[$key]['count']); } } } + unset($attr['count']); unset($attr['dn']); @@ -456,6 +457,13 @@ class LDAP{ }else{ /* If this is no department */ foreach($attr as $key => $value){ + $sr= ldap_read($this->cid, $this->fix($sourcedn), "(objectClass=*)", array($key)); + $ei= ldap_first_entry($this->cid, $sr); + $tmp = (@ldap_get_values_len($this->cid, $ei,$key)); + if(is_array($tmp)){ + $attr[$key] = $tmp; + } + if(is_numeric($key)) unset($attr[$key]); if(isset($attr[$key]['count'])){ if(($attr[$key]['count']==1)&&($key!="objectClass")){ @@ -470,6 +478,7 @@ class LDAP{ } unset($attr['count']); unset($attr['dn']); + if($type=="branch"){ $attr['FAIstate'] ="branch"; diff --git a/include/php_setup.inc b/include/php_setup.inc index 07b2dc57c..c9f3b3f6d 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -80,7 +80,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) $trace= debug_backtrace(); /* Generate trace history */ - for ($index= 1; $index