summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f04d34)
raw | patch | inline | side by side (parent: 9f04d34)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 07:10:05 +0000 (07:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 07:10:05 +0000 (07:10 +0000) |
-Fall back from get_sub_list() to get_list() fixed.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9041 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9041 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 193524d263219379ac87708c253ead23e821fedf..07990f8e24a9451bac8c30ebc452ebd6dfef3e4f 100644 (file)
@@ -784,8 +784,15 @@ function get_sub_list($filter, $category,$sub_bases, $base= "", $attributes= arr
* If not, fall back to old method, get_list().
*/
$sub_enabled = isset($config->current['SUB_LIST_SUPPORT']) && preg_match("/true/i",$config->current['SUB_LIST_SUPPORT']);
- if($sub_bases == "" || !$sub_enabled){
- return(get_list($filter, $category,$base,$attributes,$flags));
+ if(!count($sub_bases) || !$sub_enabled){
+
+ /* Log this fall back, it may be an unpredicted behaviour.
+ */
+ if(!count($sub_bases)){
+ gosa_log("debug","get_sub_list","",$attributes,sprintf("get_sub_list(): Falling back to get_list(), due to empty sub_bases parameter. This may slow down GOsa.",$src,$attrs['dn']));
+ }
+ $tmp = get_list($filter, $category,$base,$attributes,$flags | GL_SUBSEARCH);
+ return($tmp);
}
/* Get all deparments matching the given sub_bases */
@@ -896,6 +903,7 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G
$result= array();
while($attrs = $ldap->fetch()) {
+
$dn= $ldap->getDN();
/* Convert dn into a printable format */