Code

Fixed recursive copy, to use binary attributes if possible
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Feb 2006 08:29:52 +0000 (08:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Feb 2006 08:29:52 +0000 (08:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2715 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ldap.inc
include/php_setup.inc

index 4c2b1b49883cf5852d1113a7f30ec154dee26e00..5368093bb8090173a290a2b4951b37c04d7575bd 100644 (file)
@@ -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";
index 07b2dc57cb86fe243009206c5bf3d6cf955e7f2c..c9f3b3f6d9e493aeb290e126574e229c0faa8fbf 100644 (file)
@@ -80,7 +80,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
     $trace= debug_backtrace();
 
     /* Generate trace history */
-    for ($index= 1; $index<count($trace); $index++){
+    for ($index= 0; $index<count($trace); $index++){
       $ct= $trace[$index];
       $loc= "";
       if (isset($ct['class'])){