From a48e6ec6e964ea6bcb7b8bd6f8bd540e9f19dcdd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 23 Jan 2005 14:16:20 +0000 Subject: [PATCH] fixed start page if users are not displayed --- lam/templates/main.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lam/templates/main.php b/lam/templates/main.php index fa12a3b3..5c1750d9 100644 --- a/lam/templates/main.php +++ b/lam/templates/main.php @@ -36,21 +36,29 @@ if (!isset($_SESSION['cache'])) { $_SESSION['cache'] = new cache(); } +$startPage = ""; // check if all suffixes in conf-file exist $conf = $_SESSION['config']; $new_suffs = array(); if ($conf->get_UserSuffix() && ($conf->get_UserSuffix() != "")) { + $startPage = "./lists/listusers.php"; $info = @ldap_search($_SESSION['ldap']->server, $conf->get_UserSuffix(), "", array()); $res = @ldap_get_entries($_SESSION['ldap']->server, $info); if (!$res && !in_array($conf->get_UserSuffix(), $new_suffs)) $new_suffs[] = $conf->get_UserSuffix(); } if ($conf->get_GroupSuffix() && ($conf->get_GroupSuffix() != "")) { + if ($startPage == "") { + $startPage = "./lists/listgroups.php"; + } $info = @ldap_search($_SESSION['ldap']->server, $conf->get_GroupSuffix(), "", array()); $res = @ldap_get_entries($_SESSION['ldap']->server, $info); if (!$res && !in_array($conf->get_GroupSuffix(), $new_suffs)) $new_suffs[] = $conf->get_GroupSuffix(); } if ($conf->get_HostSuffix() && ($conf->get_HostSuffix() != "")) { + if ($startPage == "") { + $startPage = "./lists/listhosts.php"; + } $info = @ldap_search($_SESSION['ldap']->server, $conf->get_HostSuffix(), "", array()); $res = @ldap_get_entries($_SESSION['ldap']->server, $info); if (!$res && !in_array($conf->get_HostSuffix(), $new_suffs)) $new_suffs[] = $conf->get_HostSuffix(); @@ -80,7 +88,7 @@ echo (" 0) echo ("\n"); -else echo ("\n"); +else echo ("\n"); echo ("\n"); echo ("This page requires a browser that can show frames!\n"); echo ("\n");