From: hickert Date: Thu, 23 Feb 2006 09:25:59 +0000 (+0000) Subject: Updated FAI copy recursive X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b5e9f6f1293f2f17e4f460e35aa231a3a997f3d7;p=gosa.git Updated FAI copy recursive Should be faster now git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2730 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 5368093bb..1570b8aab 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -431,12 +431,6 @@ class LDAP{ /* Filter unneeded informations */ foreach($attr as $key => $value){ if(is_numeric($key)) unset($attr[$key]); - if(isset($attr[$key]['count'])){ - if(($attr[$key]['count']==1)&&($key!="objectClass")){ - $attr[$key] = $attr[$key][0]; - } - } - if(isset($attr[$key]['count'])){ if(is_array($attr[$key])){ unset($attr[$key]['count']); @@ -457,19 +451,17 @@ 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")){ - $attr[$key] = $attr[$key][0]; + if(in_array($key ,array("FAItemplateFile","FAIscript"))){ + $sr= ldap_read($this->cid, $this->fix($sourcedn), "(objectClass=FAIclass)", 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(is_array($attr[$key])){ unset($attr[$key]['count']);