summaryrefslogtreecommitdiffstats
path: root/lib/Smokeping.pm
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2007-11-05 22:59:38 +0100
committerTobi Oetiker <tobi@oetiker.ch>2007-11-05 22:59:38 +0100
commit2fe8ba68414b66a7f68f4876916ba3a98648858d (patch)
tree8a84338960b785befd74f2f83341a420f602901f /lib/Smokeping.pm
parent65ae52a910578163e0b5e821fb75fc3cf5d28528 (diff)
downloadsmokeping-2fe8ba68414b66a7f68f4876916ba3a98648858d.tar.gz
smokeping-2fe8ba68414b66a7f68f4876916ba3a98648858d.tar.xz
prepare for the release of smokeping-2.2.7
Diffstat (limited to 'lib/Smokeping.pm')
-rw-r--r--lib/Smokeping.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 749af41..1c66001 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -37,7 +37,7 @@ use Smokeping::RRDtools;
# globale persistent variables for speedy
use vars qw($cfg $probes $VERSION $havegetaddrinfo $cgimode);
-$VERSION="2.002006";
+$VERSION="2.002007";
# we want opts everywhere
my %opt;
@@ -1355,13 +1355,10 @@ sub load_sortercache($){
sub display_webpage($$){
my $cfg = shift;
my $q = shift;
- my $open_orig = [ split /\./,( $q->param('target') || '')];
- my $open = [@$open_orig]; # in this version we get rid of the 'slave' part if there is any
- my ($host,$slave);
- if (0 < @$open){
- ($host,$slave) = split(/~/, $open->[-1]);
- $open->[-1] = $host;
- }
+ my ($path,$slave) = split(/~/,$q->param('target') || '');
+ my $open = [ (split /\./,$path) ];
+ my $open_orig = [@$open];
+ $open_orig->[-1] .= '~'.$slave if $slave;
my $tree = $cfg->{Targets};
my $targets = $cfg->{Targets};