diff options
Diffstat (limited to 'type/Default.class.php')
-rw-r--r-- | type/Default.class.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index cc1818a..eaf2e8e 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -98,6 +98,10 @@ class Type_Default { | |||
98 | return $c['r'].$c['g'].$c['b']; | 98 | return $c['r'].$c['g'].$c['b']; |
99 | } | 99 | } |
100 | 100 | ||
101 | function rrd_escape($value) { | ||
102 | return str_replace(':', '\:', $value); | ||
103 | } | ||
104 | |||
101 | function rrd_files() { | 105 | function rrd_files() { |
102 | $files = $this->get_filenames(); | 106 | $files = $this->get_filenames(); |
103 | 107 | ||
@@ -234,9 +238,9 @@ class Type_Default { | |||
234 | $i=0; | 238 | $i=0; |
235 | foreach ($this->tinstances as $tinstance) { | 239 | foreach ($this->tinstances as $tinstance) { |
236 | foreach ($this->data_sources as $ds) { | 240 | foreach ($this->data_sources as $ds) { |
237 | $rrdgraph[] = sprintf('DEF:min_%s="%s":%s:MIN', crc32hex($sources[$i]), $this->files[$tinstance], $ds); | 241 | $rrdgraph[] = sprintf('DEF:min_%s="%s":%s:MIN', crc32hex($sources[$i]), $this->rrd_escape($this->files[$tinstance]), $ds); |
238 | $rrdgraph[] = sprintf('DEF:avg_%s="%s":%s:AVERAGE', crc32hex($sources[$i]), $this->files[$tinstance], $ds); | 242 | $rrdgraph[] = sprintf('DEF:avg_%s="%s":%s:AVERAGE', crc32hex($sources[$i]), $this->rrd_escape($this->files[$tinstance]), $ds); |
239 | $rrdgraph[] = sprintf('DEF:max_%s="%s":%s:MAX', crc32hex($sources[$i]), $this->files[$tinstance], $ds); | 243 | $rrdgraph[] = sprintf('DEF:max_%s="%s":%s:MAX', crc32hex($sources[$i]), $this->rrd_escape($this->files[$tinstance]), $ds); |
240 | $i++; | 244 | $i++; |
241 | } | 245 | } |
242 | } | 246 | } |