summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-06-05 18:04:39 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-06-05 18:04:39 -0400
commite8d8386e5258c055f253b20ad717461972b11c7d (patch)
treedce322486cf1b18ab91853a3c4c18bd45fdcb077 /IkiWiki
parent8d7488823582d63948a856222f275a01ac1939a2 (diff)
pagecount: Fix broken optimisation for * pagespec.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/pagecount.pm9
1 files changed, 7 insertions, 2 deletions
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;
}