minor variable name change
This commit is contained in:
parent
69cf1b3a8b
commit
7e0b8be958
10
index.pl
10
index.pl
@ -212,16 +212,16 @@ sub menu {
|
||||
if (-e $data_dir."menucont") {
|
||||
open(MENUFILE, "<", $data_dir."menucont") or return "Problem accessing menu file:".$!;
|
||||
while(my $item = <MENUFILE>) {
|
||||
push(@{$menus{"main"}},$item);
|
||||
push(@{$menus{"menu"}},$item);
|
||||
}
|
||||
close(MENUFILE);
|
||||
chomp @{$menus{"main"}};
|
||||
chomp @{$menus{"menu"}};
|
||||
} else {
|
||||
opendir(my $dir,$pages_dir) or return "Problem parsing the pages directory:".$!;
|
||||
while (my $file = readdir($dir)) {
|
||||
next if ($file =~ m/^\./);
|
||||
next if ($file =~ m/_dir$/);
|
||||
push (@{$menus{"main"}}, $file);
|
||||
push (@{$menus{"menu"}}, $file);
|
||||
}
|
||||
close($dir);
|
||||
}
|
||||
@ -238,8 +238,8 @@ sub menu {
|
||||
}
|
||||
my $buffer = "";
|
||||
# main needs to be output first then the rest of the menus can be looped through
|
||||
$buffer .= render_menu("main",@{$menus{"main"}});
|
||||
delete($menus{"main"});
|
||||
$buffer .= render_menu("menu",@{$menus{"menu"}});
|
||||
delete($menus{"menu"});
|
||||
for my $menu_name (sort keys %menus) {
|
||||
$buffer .= render_menu($menu_name,@{$menus{$menu_name}});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user