X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/bf7f935de20f360843aa2a7b1e4563248766de8a..a2bab345aedcfbb03bdf0e0aa1f28a5c57a5d02b:/SL/Menu.pm diff --git a/SL/Menu.pm b/SL/Menu.pm index 8cc9c7e06..6bbcffb9c 100644 --- a/SL/Menu.pm +++ b/SL/Menu.pm @@ -21,7 +21,7 @@ sub new { my $path = File::Spec->catdir('menus', $domain); opendir my $dir, $path or die "can't open $path: $!"; - my @files = sort grep -f "$path/$_", readdir $dir; + my @files = sort grep -f "$path/$_", grep /\.yaml$/, readdir $dir; close $dir; my $nodes = []; @@ -103,7 +103,7 @@ sub build_tree { my %by_parent; # order them by parent for my $node ($self->nodes) { - push @{ $by_parent{ $node->{parent} } //= [] }, $node; + push @{ $by_parent{ $node->{parent} // '' } //= [] }, $node; } my $tree = { };