From 010b7b232dd1117fa4850065c4edde74298dcfab Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Tue, 12 Jan 2010 20:17:33 +0100 Subject: show error when no hosts are found in datadir --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 437093d..18d8313 100644 --- a/index.php +++ b/index.php @@ -18,7 +18,8 @@ if (is_array($CONFIG['cat'])) { } # search for uncategorized hosts -$chosts = collectd_hosts(); +if(!$chosts = collectd_hosts()) + printf('

Error: No Collectd hosts found in %s

', $CONFIG['datadir']); $uhosts = array_diff($chosts, $h); # show all uncategorized hosts -- cgit v1.1