diff options
author | Pim van den Berg | 2010-03-21 13:48:02 +0100 |
---|---|---|
committer | Pim van den Berg | 2010-03-21 13:48:02 +0100 |
commit | 2565f7088845489d50519f8fa91ba03d386d97d4 (patch) | |
tree | 0058f43e2a4488a622d9d86b9847b32d124c21c5 /type/Default.class.php | |
parent | configuration option to show load averages on overview page (diff) | |
download | apt-panopticon_cgp-2565f7088845489d50519f8fa91ba03d386d97d4.zip apt-panopticon_cgp-2565f7088845489d50519f8fa91ba03d386d97d4.tar.gz apt-panopticon_cgp-2565f7088845489d50519f8fa91ba03d386d97d4.tar.bz2 apt-panopticon_cgp-2565f7088845489d50519f8fa91ba03d386d97d4.tar.xz |
fix: file2identifier must return identifiers (not basenames)
The identifier is needed to send the FLUSH command to the UnixSock plugin.
Partly revert of commit:
596dd7d41 [make rrdfiles using utf8 and spaces work]
Diffstat (limited to 'type/Default.class.php')
-rw-r--r-- | type/Default.class.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index 07e17aa..e3997de 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -128,7 +128,8 @@ class Type_Default { | |||
128 | function file2identifier($files) { | 128 | function file2identifier($files) { |
129 | foreach($files as $key => $file) { | 129 | foreach($files as $key => $file) { |
130 | if (is_file($file)) { | 130 | if (is_file($file)) { |
131 | $files[$key] = basename($files[$key], '.rrd'); | 131 | $files[$key] = preg_replace("#^$this->datadir/#u", '', $files[$key]); |
132 | $files[$key] = preg_replace('#\.rrd$#', '', $files[$key]); | ||
132 | } | 133 | } |
133 | } | 134 | } |
134 | 135 | ||