X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/08d0bd73384b79b5c21f75b06a982fc62998a0c2..3096c8ea69783b1c1cfbf5b9f940d2939d2a33f5:/IkiWiki/Plugin/pagestats.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index fdda5767a..5479e8986 100644 --- a/IkiWiki/Plugin/pagestats.pm +++ b/IkiWiki/Plugin/pagestats.pm @@ -35,8 +35,7 @@ sub preprocess (@) { #{{{ foreach my $page (keys %links) { if (pagespec_match($page, $params{pages}, location => $params{page})) { use IkiWiki::Render; - my @bl = IkiWiki::backlinks($page); - $counts{$page} = scalar(@{$bl[0]})+scalar(@{$bl[1]}); + $counts{$page} = scalar(IkiWiki::backlinks($page)); $max = $counts{$page} if $counts{$page} > $max; } } @@ -50,7 +49,8 @@ sub preprocess (@) { #{{{ } sort { $counts{$b} <=> $counts{$a} } keys %counts). "\n\n" ; - } else { + } + else { # In case of misspelling, default to a page cloud my $res = "