From 77598dfa9fccb668345198ea169cf7cf00b9845e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Oct 2009 19:29:28 -0400 Subject: [PATCH] linkmap, pagestats: avoid using %links to get a list of pages When a page is deleted, it is removed from %pagesources, but not from %links. So use the former. --- IkiWiki/Plugin/linkmap.pm | 2 +- IkiWiki/Plugin/pagestats.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IkiWiki/Plugin/linkmap.pm b/IkiWiki/Plugin/linkmap.pm index d7ba68da9..3d20a6521 100644 --- a/IkiWiki/Plugin/linkmap.pm +++ b/IkiWiki/Plugin/linkmap.pm @@ -56,7 +56,7 @@ sub genmap ($) { # Get all the items to map. my %mapitems = (); - foreach my $item (keys %links) { + foreach my $item (keys %pagesources) { if (pagespec_match($item, $params{pages}, location => $params{page})) { $mapitems{$item}=urlto($item, $params{destpage}); } diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index 0765c1cfa..afe4eeaf2 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -45,7 +45,7 @@ sub preprocess (@) { my %counts; my $max = 0; - foreach my $page (pagespec_match_list([keys %links], + foreach my $page (pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page})) { use IkiWiki::Render; -- 2.26.2