aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type/Default.class.php
diff options
context:
space:
mode:
authorPim van den Berg2010-03-21 13:48:02 +0100
committerPim van den Berg2010-03-21 13:48:02 +0100
commit2565f7088845489d50519f8fa91ba03d386d97d4 (patch)
tree0058f43e2a4488a622d9d86b9847b32d124c21c5 /type/Default.class.php
parentconfiguration option to show load averages on overview page (diff)
downloadapt-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.php3
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