summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 07ee1ad)
raw | patch | inline | side by side (parent: 07ee1ad)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Feb 2006 09:25:59 +0000 (09:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 23 Feb 2006 09:25:59 +0000 (09:25 +0000) |
Should be faster now
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2730 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2730 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_ldap.inc | patch | blob | history |
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 5368093bb8090173a290a2b4951b37c04d7575bd..1570b8aab6ad2cd2bcb68dce134a6855128a17cd 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
/* 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']);
}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']);