X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2f96c49bd1826ecb213ae025ad456a714aa04863..83b9bf54ec85f7c1156983108f57c2b1af0e8fe5:/IkiWiki/Plugin/pagecount.pm?ds=inline diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index a561e58e5..80561350b 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -23,10 +23,16 @@ sub preprocess (@) { $params{pages}="*" unless defined $params{pages}; # Needs to update count whenever a page is added or removed, so - # register a dependency. - add_depends($params{page}, $params{pages}); + # register a presence dependency. + add_depends($params{page}, $params{pages}, presence => 1); - my @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page}); + my @pages; + if ($params{pages} eq "*") { + @pages=keys %pagesources; + } + else { + @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page}); + } return $#pages+1; }