]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/pagecount.pm
Put old unixauth plugin under git control. Needs some serious attention.
[git.ikiwiki.info.git] / IkiWiki / Plugin / pagecount.pm
index f8881a04bdacab3f3f086cefd29323f8463c82c5..5a2301af49232943d4f0889c0f3b9ba28f05396f 100644 (file)
@@ -26,9 +26,13 @@ sub preprocess (@) {
        # register a dependency.
        add_depends($params{page}, $params{pages});
        
-       my @pages=keys %pagesources;
-       @pages=pagespec_match_list(\@pages, $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;
 }