]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/pagecount.pm
* Turn off tidy indentation too.
[ikiwiki.git] / IkiWiki / Plugin / pagecount.pm
index fc69e449bb2612ee6afb73f95b4d9977448afbb5..cfc962b6c4df0172fca409033326b3153602fc3f 100644 (file)
@@ -7,7 +7,8 @@ use strict;
 use IkiWiki;
 
 sub import { #{{{
-       IkiWiki::register_plugin("preprocess", "pagecount", \&preprocess);
+       IkiWiki::hook(type => "preprocess", id => "pagecount", 
+               call => \&preprocess);
 } # }}}
 
 sub preprocess (@) { #{{{
@@ -22,7 +23,7 @@ sub preprocess (@) { #{{{
        return $#pages+1 if $params{pages} eq "*"; # optimisation
        my $count=0;
        foreach my $page (@pages) {
-               $count++ if IkiWiki::globlist_match($page, $params{pages});
+               $count++ if IkiWiki::pagespec_match($page, $params{pages});
        }
        return $count;
 } # }}}