From 782e4d48dffc698903d93a7024defc874854f778 Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 29 Jul 2006 20:30:39 +0000 Subject: fix %links iteration --- IkiWiki/Plugin/brokenlinks.pm | 2 +- IkiWiki/Plugin/pagestats.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/brokenlinks.pm b/IkiWiki/Plugin/brokenlinks.pm index 3406f9919..09ce181cf 100644 --- a/IkiWiki/Plugin/brokenlinks.pm +++ b/IkiWiki/Plugin/brokenlinks.pm @@ -20,7 +20,7 @@ sub preprocess (@) { #{{{ IkiWiki::add_depends($params{page}, $params{pages}); my @broken; - foreach my $page (%IkiWiki::links) { + foreach my $page (keys %IkiWiki::links) { if (IkiWiki::globlist_match($page, $params{pages})) { foreach my $link (@{$IkiWiki::links{$page}}) { next if $link =~ /.*\/discussion/i && $IkiWiki::config{discussion}; diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 1d4d5ecdf..a1b4c1d45 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -33,7 +33,7 @@ sub preprocess (@) { #{{{ my %counts; my $max = 0; - foreach my $page (%IkiWiki::links) { + foreach my $page (keys %IkiWiki::links) { if (IkiWiki::globlist_match($page, $params{pages})) { my @bl = IkiWiki::backlinks($page); $counts{$page} = scalar(@bl); -- cgit v1.2.3