diff options
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | rrd.php | 6 | ||||
-rw-r--r-- | type/GenericStacked.class.php | 2 |
3 files changed, 5 insertions, 5 deletions
@@ -9,7 +9,7 @@ html_start(); | |||
9 | $h = array(); | 9 | $h = array(); |
10 | 10 | ||
11 | # show all categorized hosts | 11 | # show all categorized hosts |
12 | if (is_array($CONFIG['cat'])) { | 12 | if (isset($CONFIG['cat']) && is_array($CONFIG['cat'])) { |
13 | foreach($CONFIG['cat'] as $cat => $hosts) { | 13 | foreach($CONFIG['cat'] as $cat => $hosts) { |
14 | host_summary($cat, $hosts); | 14 | host_summary($cat, $hosts); |
15 | $h = array_merge($h, $hosts); | 15 | $h = array_merge($h, $hosts); |
@@ -8,9 +8,9 @@ if ($file = validateRRDPath($CONFIG['datadir'], $_SERVER['PATH_INFO'])) { | |||
8 | header('Content-Type: application/octet-stream'); | 8 | header('Content-Type: application/octet-stream'); |
9 | header('Content-Disposition: attachment; filename='.basename($file)); | 9 | header('Content-Disposition: attachment; filename='.basename($file)); |
10 | header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); | 10 | header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); |
11 | ob_clean(); | 11 | if(ob_get_length()) ob_clean(); |
12 | flush(); | 12 | flush(); |
13 | readfile($file); | 13 | readfile($file); |
14 | } else { | 14 | } else { |
15 | header('HTTP/1.0 403 Forbidden'); | 15 | header('HTTP/1.0 403 Forbidden'); |
16 | 16 | ||
diff --git a/type/GenericStacked.class.php b/type/GenericStacked.class.php index 63d7f33..3f249c7 100644 --- a/type/GenericStacked.class.php +++ b/type/GenericStacked.class.php | |||
@@ -37,7 +37,7 @@ class Type_GenericStacked extends Type_Default { | |||
37 | if ($i == (count($sources)-1)) | 37 | if ($i == (count($sources)-1)) |
38 | $rrdgraph[] = sprintf('CDEF:area_%s=avg_%1$s', crc32hex($sources[$i])); | 38 | $rrdgraph[] = sprintf('CDEF:area_%s=avg_%1$s', crc32hex($sources[$i])); |
39 | else | 39 | else |
40 | $rrdgraph[] = sprintf('CDEF:area_%s=area_%s,avg_%1$s,+', crc32hex($sources[$i]), crc32hex($sources[$i+1])); | 40 | $rrdgraph[] = sprintf('CDEF:area_%s=area_%s,avg_%1$s,ADDNAN', crc32hex($sources[$i]), crc32hex($sources[$i+1])); |
41 | } | 41 | } |
42 | 42 | ||
43 | $c = 0; | 43 | $c = 0; |