aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/inc/collectd.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/collectd.inc.php')
-rw-r--r--inc/collectd.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/collectd.inc.php b/inc/collectd.inc.php
index fda685d..761f7c4 100644
--- a/inc/collectd.inc.php
+++ b/inc/collectd.inc.php
@@ -9,7 +9,7 @@ function collectd_hosts() {
9 global $CONFIG; 9 global $CONFIG;
10 10
11 if (!is_dir($CONFIG['datadir'])) 11 if (!is_dir($CONFIG['datadir']))
12 return false; 12 return array();
13 13
14 $dir = array_diff(scandir($CONFIG['datadir']), array('.', '..')); 14 $dir = array_diff(scandir($CONFIG['datadir']), array('.', '..'));
15 foreach($dir as $k => $v) { 15 foreach($dir as $k => $v) {
@@ -17,7 +17,7 @@ function collectd_hosts() {
17 unset($dir[$k]); 17 unset($dir[$k]);
18 } 18 }
19 19
20 return $dir ? $dir : false; 20 return $dir;
21} 21}
22 22
23 23
@@ -36,7 +36,7 @@ function get_host_rrd_files($dir) {
36 $files[] = str_replace($dir.'/', '', $object->getPathname()); 36 $files[] = str_replace($dir.'/', '', $object->getPathname());
37 } 37 }
38 38
39 return $files ? $files : false; 39 return $files;
40} 40}
41 41
42 42