aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
Diffstat (limited to 'type')
-rw-r--r--type/Default.class.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/type/Default.class.php b/type/Default.class.php
index c4fa8a9..2cd8560 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -34,7 +34,6 @@ class Type_Default {
34 $this->cache = $config['cache']; 34 $this->cache = $config['cache'];
35 $this->parse_get(); 35 $this->parse_get();
36 $this->rrd_files(); 36 $this->rrd_files();
37 $this->identifiers = $this->file2identifier($this->files);
38 $this->width = GET('x'); 37 $this->width = GET('x');
39 if (empty($this->width)) $this->width = $config['width']; 38 if (empty($this->width)) $this->width = $config['width'];
40 $this->height = GET('y'); 39 $this->height = GET('y');
@@ -143,10 +142,12 @@ class Type_Default {
143 142
144 $this->tinstances[] = $instance; 143 $this->tinstances[] = $instance;
145 $this->files[$instance] = $filename; 144 $this->files[$instance] = $filename;
145 $this->identifiers[$instance] = preg_replace("#^$this->datadir/(.*)\.rrd$#", '$1', $filename);
146 } 146 }
147 147
148 sort($this->tinstances); 148 sort($this->tinstances);
149 ksort($this->files); 149 ksort($this->files);
150 ksort($this->identifiers);
150 } 151 }
151 152
152 function get_filenames() { 153 function get_filenames() {
@@ -166,17 +167,6 @@ class Type_Default {
166 return $files; 167 return $files;
167 } 168 }
168 169
169 function file2identifier($files) {
170 foreach($files as $key => $file) {
171 if (is_file($file)) {
172 $files[$key] = preg_replace("#^$this->datadir/#u", '', $files[$key]);
173 $files[$key] = preg_replace('#\.rrd$#', '', $files[$key]);
174 }
175 }
176
177 return $files;
178 }
179
180 function rrd_graph($debug = false) { 170 function rrd_graph($debug = false) {
181 if (!$this->colors) 171 if (!$this->colors)
182 $this->rainbow_colors(); 172 $this->rainbow_colors();