diff options
author | Pim van den Berg | 2010-09-11 11:27:29 +0200 |
---|---|---|
committer | Pim van den Berg | 2010-09-11 12:10:31 +0200 |
commit | 73c1c27c155830ecf57a1c864df6bb1b7cfaaee1 (patch) | |
tree | 01b37f486e5b58684a7b65031d505b25c74ec5da | |
parent | plugin/wireless: better labels and deduplicate code (diff) | |
download | apt-panopticon_cgp-73c1c27c155830ecf57a1c864df6bb1b7cfaaee1.zip apt-panopticon_cgp-73c1c27c155830ecf57a1c864df6bb1b7cfaaee1.tar.gz apt-panopticon_cgp-73c1c27c155830ecf57a1c864df6bb1b7cfaaee1.tar.bz2 apt-panopticon_cgp-73c1c27c155830ecf57a1c864df6bb1b7cfaaee1.tar.xz |
type/default: dont strip 1st char from instance name when there is no type instance
Diffstat (limited to '')
-rw-r--r-- | type/Default.class.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/type/Default.class.php b/type/Default.class.php index a56e00c..e4d3dec 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -105,7 +105,9 @@ class Type_Default { | |||
105 | 105 | ||
106 | foreach($files as $filename) { | 106 | foreach($files as $filename) { |
107 | $basename=basename($filename,'.rrd'); | 107 | $basename=basename($filename,'.rrd'); |
108 | $instance=substr($basename,strpos($basename,'-')+1); | 108 | $instance = strpos($basename,'-') |
109 | ? substr($basename, strpos($basename,'-') + 1) | ||
110 | : $basename; | ||
109 | 111 | ||
110 | $this->tinstances[] = $instance; | 112 | $this->tinstances[] = $instance; |
111 | $this->files[$instance] = $filename; | 113 | $this->files[$instance] = $filename; |