summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47cac37)
raw | patch | inline | side by side (parent: 47cac37)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 07:43:11 +0000 (07:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 07:43:11 +0000 (07:43 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8644 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 801f6101dcaf2c26f048e5fff54297e6f6c808e8..f56bbbd42e11925b4554f391d9d02fd0edf1d0b2 100644 (file)
*/
function get_sub_list($filter, $category,$sub_base, $base= "", $attributes= array(), $flags= GL_SUBSEARCH)
{
-
global $config, $ui;
/* Get LDAP link */
@@ -773,8 +772,12 @@ function get_sub_list($filter, $category,$sub_base, $base= "", $attributes= arra
/* Remove , ("ou=1,ou=2.." => "ou=1") */
$sub_base = preg_replace("/,.*$/","",$sub_base);
- /* Check if there is a sub department specified */
- if($sub_base == ""){
+ /* Check if we have enabled the sub_dir search support AND
+ * if there is a sub department specified.
+ * 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_base == "" || !$sub_enabled){
return(get_list($filter, $category,$base,$attributes,$flags));
}