summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee9bbbb)
raw | patch | inline | side by side (parent: ee9bbbb)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Oct 2009 18:05:40 +0000 (18:05 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Oct 2009 18:05:40 +0000 (18:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14694 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filterLDAP.inc | patch | blob | history |
index 5a6701d65540462693a5b681e7b475167d8e2a60..e929bee90f1781a88cce2a3570b83fab8a901b1a 100644 (file)
if (!is_array($objectStorage)) {
$objectStorage= array($objectStorage);
}
+ $method= empty($objectStorage)?"ls":"search";
// Initialize search bases
$bases= array();
}
// Switch to new base and search
- $ldap->cd($base);
if (is_array($dnFilters)){
$dnFilter= "(|";
foreach ($dnFilters as $df) {
} else {
$dnFilter= "";
}
- $ldap->search ("(&$filter$dnFilter)", $attributes);
+ $ldap->cd($base);
+ if ($method == "ls") {
+ $ldap->ls("(&$filter$dnFilter)", $base, $attributes);
+ } else {
+ $ldap->search("(&$filter$dnFilter)", $attributes);
+ }
// Check for size limit exceeded messages for GUI feedback
if (preg_match("/size limit/i", $ldap->get_error())){