summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 12adbf5)
raw | patch | inline | side by side (parent: 12adbf5)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Sep 2006 11:48:43 +0000 (11:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Sep 2006 11:48:43 +0000 (11:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4785 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/generic/references/class_reference.inc | patch | blob | history |
diff --git a/plugins/generic/references/class_reference.inc b/plugins/generic/references/class_reference.inc
index 3f53973be357e1e011b07604b88f2ddc1dbcc625..fe047ba3af2aca222a9ac16e804c4e3f9176b070 100644 (file)
}
foreach ($attrs[$memberattr] as $uid){
$content= $this->getCacheObject($uid);
+ if ($content == NULL) {
+ continue;
+ }
$addon.= '<tr style="background-color:'.$cycle[$id&1].';"><td title="'.$attrs['cn'][0].'"> '.$content['name'].'</td><td>'.$content['description'].'</td><td>'.$content['type'].'</td> </tr>';
}
}
} else {
$ldap->search("(uid=$dn)", array("cn", "objectClass", "description"));
}
- $attrs= $ldap->fetch();
- if (isset($attrs['description'])){
- $description= $attrs['description'][0];
+ if ($ldap->count()){
+ $attrs= $ldap->fetch();
+ if (isset($attrs['description'])){
+ $description= $attrs['description'][0];
+ } else {
+ $description= "-";
+ }
+ $this->objectCache[$dn]= array( 'name' => $attrs['cn'][0],
+ 'description' => "$description",
+ 'type' => $this->createContentString($attrs['objectClass']));
} else {
- $description= "-";
+ return NULL;
}
- $this->objectCache[$dn]= array( 'name' => $attrs['cn'][0],
- 'description' => "$description",
- 'type' => $this->createContentString($attrs['objectClass']));
}
return ($this->objectCache[$dn]);
}