summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-03-18 23:21:33 +0100
committerTobi Oetiker <tobi@oetiker.ch>2008-03-18 23:21:33 +0100
commite06a42e7920eb3ad2cafc62b5db21746126ce37c (patch)
treeab89b2f30e6022953f09e222cc92d3d49e497a9d /lib
parent877ac7fb8e93efcf0d7b547168749984bd4aa99d (diff)
downloadsmokeping-e06a42e7920eb3ad2cafc62b5db21746126ce37c.tar.gz
smokeping-e06a42e7920eb3ad2cafc62b5db21746126ce37c.tar.xz
fix order for non ordered entries
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 26e8195..62021e2 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -615,7 +615,7 @@ sub target_menu($$$$;$){
my $print;
my $current = shift @{$open} || "";
my @hashes;
- foreach my $prop (sort {$tree->{$a}{_order} ? ($tree->{$a}{_order} <=> $tree->{$b}{_order}) : ($a cmp $b)}
+ foreach my $prop (sort {exists $tree->{$a}{_order} ? ($tree->{$a}{_order} <=> $tree->{$b}{_order}) : ($a cmp $b)}
grep { ref $tree->{$_} eq 'HASH' and not /^__/ }
keys %$tree) {
push @hashes, $prop;
@@ -748,7 +748,7 @@ sub get_overview ($$$$){
if ( $RRDs::VERSION >= 1.199908 ){
$date =~ s|:|\\:|g;
}
- foreach my $prop (sort {$tree->{$a}{_order} ? ($tree->{$a}{_order} <=> $tree->{$b}{_order}) : ($a cmp $b)}
+ foreach my $prop (sort {exists $tree->{$a}{_order} ? ($tree->{$a}{_order} <=> $tree->{$b}{_order}) : ($a cmp $b)}
grep { ref $tree->{$_} eq 'HASH' and not /^__/ }
keys %$tree) {
my @slaves;