fix %links iteration

master
joey 2006-07-29 20:30:39 +00:00
parent 299bb8bef3
commit 782e4d48df
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ sub preprocess (@) { #{{{
IkiWiki::add_depends($params{page}, $params{pages}); IkiWiki::add_depends($params{page}, $params{pages});
my @broken; my @broken;
foreach my $page (%IkiWiki::links) { foreach my $page (keys %IkiWiki::links) {
if (IkiWiki::globlist_match($page, $params{pages})) { if (IkiWiki::globlist_match($page, $params{pages})) {
foreach my $link (@{$IkiWiki::links{$page}}) { foreach my $link (@{$IkiWiki::links{$page}}) {
next if $link =~ /.*\/discussion/i && $IkiWiki::config{discussion}; next if $link =~ /.*\/discussion/i && $IkiWiki::config{discussion};

View File

@ -33,7 +33,7 @@ sub preprocess (@) { #{{{
my %counts; my %counts;
my $max = 0; my $max = 0;
foreach my $page (%IkiWiki::links) { foreach my $page (keys %IkiWiki::links) {
if (IkiWiki::globlist_match($page, $params{pages})) { if (IkiWiki::globlist_match($page, $params{pages})) {
my @bl = IkiWiki::backlinks($page); my @bl = IkiWiki::backlinks($page);
$counts{$page} = scalar(@bl); $counts{$page} = scalar(@bl);