index 801f6101dcaf2c26f048e5fff54297e6f6c808e8..e0561c2bbfc0056c56635bd57d1a249c78b25750 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));
}
exit();
}
-
-function display_error_page()
-{
- $smarty= get_smarty();
- $smarty->display(get_template_path('headers.tpl'));
- echo "<body>".msg_dialog::get_dialogs()."</body></html>";
- exit();
-}
-
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>