X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/58141a0ebcdf3313a83af712b83f8acd1c08aa3b..52bbdbb1a5ce994c9afac253c1d9bfd94acf4d1d:/IkiWiki/Plugin/pagecount.pm diff --git a/IkiWiki/Plugin/pagecount.pm b/IkiWiki/Plugin/pagecount.pm index 5ba7ee50b..2c20ca195 100644 --- a/IkiWiki/Plugin/pagecount.pm +++ b/IkiWiki/Plugin/pagecount.pm @@ -1,10 +1,9 @@ #!/usr/bin/perl -# Provides [[pagecount ]] to count the number of pages. package IkiWiki::Plugin::pagecount; use warnings; use strict; -use IkiWiki; +use IkiWiki 2.00; sub import { #{{{ hook(type => "preprocess", id => "pagecount", call => \&preprocess); @@ -22,7 +21,7 @@ sub preprocess (@) { #{{{ return $#pages+1 if $params{pages} eq "*"; # optimisation my $count=0; foreach my $page (@pages) { - $count++ if pagespec_match($page, $params{pages}, $params{page}); + $count++ if pagespec_match($page, $params{pages}, location => $params{page}); } return $count; } # }}}