fixed problems with old session data if search failed

This commit is contained in:
Roland Gruber 2003-09-23 15:35:48 +00:00
parent 513371d29f
commit 81148af18d
3 changed files with 12 additions and 2 deletions

View File

@ -136,7 +136,11 @@ if (! $_GET['norefresh']) {
// sort rows by sort column ($sort)
usort($grp_info, "cmp_array");
}
else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Groups found!"));
else {
$grp_info = array();
$_SESSION['grp_info'] = array();
StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Groups found!"));
}
}
else {
if (sizeof($grp_info) == 0) StatusMessage("WARN", "", _("No Groups found!"));

View File

@ -142,7 +142,11 @@ if (! $_GET['norefresh']) {
// sort rows by sort column ($sort)
usort($hst_info, "cmp_array");
}
else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Samba Hosts found!"));
else {
$hst_info = array();
$_SESSION['hst_info'] = array();
StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Samba Hosts found!"));
}
}
else {
if (sizeof($hst_info) == 0) StatusMessage("WARN", "", _("No Samba Hosts found!"));

View File

@ -195,6 +195,8 @@ else {
$_SESSION["userlist"] = $userinfo;
}
else {
$_SESSION['userlist'] = array();
$userinfo = array();
StatusMessage("ERROR",
_("LDAP Search failed! Please check your preferences."),
_("No Users found!"));