From eb33604b2fa10eee707a3b976d54b3a291096fa8 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 3 Apr 2003 13:37:53 +0000 Subject: [PATCH] fixed error messages if no entries were found --- lam/lib/listgroups.php | 3 ++- lam/lib/listhosts.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lam/lib/listgroups.php b/lam/lib/listgroups.php index c28776e3..1426c561 100644 --- a/lam/lib/listgroups.php +++ b/lam/lib/listgroups.php @@ -61,8 +61,9 @@ $sr = @ldap_search($_SESSION["ldap"]->server(), if ($sr) { $info = ldap_get_entries($_SESSION["ldap"]->server, $sr); ldap_free_result($sr); + if ($info["count"] == 0) echo ("

" . _("No Grous found!") . "

"); } -else echo ("

" . _("No Groups found!") . "

"); +else echo ("

" . _("LDAP Search failed! Please check your preferences.
No Groups found!") . "


"); // print host table header echo "\n"; diff --git a/lam/lib/listhosts.php b/lam/lib/listhosts.php index 7ecaba25..e1e91316 100644 --- a/lam/lib/listhosts.php +++ b/lam/lib/listhosts.php @@ -61,8 +61,9 @@ $sr = @ldap_search($_SESSION["ldap"]->server(), if ($sr) { $info = ldap_get_entries($_SESSION["ldap"]->server, $sr); ldap_free_result($sr); + if ($info["count"] == 0) echo ("

" . _("No Samba Hosts found!") . "

"); } -else echo ("

" . _("No Samba Hosts found!") . "

"); +else echo ("

" . _("LDAP Search failed! Please check your preferences.
No Samba Hosts found!") . "


"); echo ("\n"); // print host table