X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ef003f48f4a3fe8fb67fda62c70a299b07d75976..f7601954a862afd4c5a5b9ba83480af0472e1cf9:/IkiWiki/Plugin/pagecount.pm?ds=inline diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index 1955603b0..5a2301af4 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -26,8 +26,13 @@ sub preprocess (@) { # register a dependency. add_depends($params{page}, $params{pages}); - my @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page}) - if $params{pages} ne "*"; # optimisation; + my @pages; + if ($params{pages} eq "*") { + @pages=keys %pagesources; + } + else { + @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page}); + } return $#pages+1; }