X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ee1ad53c4c2710aa7ded61bdc56f3a8cce514f22..e0b3590bd958675b833c5fc3e001c31e04417580:/IkiWiki/Plugin/pagestats.pm diff --git a/IkiWiki/Plugin/pagestats.pm b/IkiWiki/Plugin/pagestats.pm index f6398c535..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); + $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 = "