]> sipb.mit.edu Git - ikiwiki.git/commitdiff
linkmap, pagestats: avoid using %links to get a list of pages
authorJoey Hess <joey@gnu.kitenet.net>
Tue, 6 Oct 2009 23:29:28 +0000 (19:29 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Tue, 6 Oct 2009 23:29:28 +0000 (19:29 -0400)
When a page is deleted, it is removed from %pagesources, but
not from %links. So use the former.

IkiWiki/Plugin/linkmap.pm
IkiWiki/Plugin/pagestats.pm

index d7ba68da9e91133c33bbef0f743430f5fd0993b0..3d20a65212ac7904f5b19aea0d2eb642ddaf1781 100644 (file)
@@ -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});
                }
index 0765c1cfa1ac566343923bd8e1491fa822a29324..afe4eeaf2e4b69855600ac5972e219292d1d2af4 100644 (file)
@@ -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;