From e8d8386e5258c055f253b20ad717461972b11c7d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 5 Jun 2009 18:04:39 -0400 Subject: pagecount: Fix broken optimisation for * pagespec. --- IkiWiki/Plugin/pagecount.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'IkiWiki/Plugin') 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; } -- cgit v1.2.3