diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-06-05 18:04:39 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-06-05 18:04:39 -0400 |
commit | e8d8386e5258c055f253b20ad717461972b11c7d (patch) | |
tree | dce322486cf1b18ab91853a3c4c18bd45fdcb077 | |
parent | 8d7488823582d63948a856222f275a01ac1939a2 (diff) |
pagecount: Fix broken optimisation for * pagespec.
-rw-r--r-- | IkiWiki/Plugin/pagecount.pm | 9 | ||||
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | doc/bugs/pagecount_is_broken.mdwn | 2 |
3 files changed, 10 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; } diff --git a/debian/changelog b/debian/changelog index 7d0fb5c80..df4429326 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ ikiwiki (3.15) UNRELEASED; urgency=low setup file can be loaded and that its config is ok. If a plugin fails for any reason, disable it in the generated file. Closes: 532001 + * pagecount: Fix broken optimisation for * pagespec. -- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400 diff --git a/doc/bugs/pagecount_is_broken.mdwn b/doc/bugs/pagecount_is_broken.mdwn index 179981855..101230d94 100644 --- a/doc/bugs/pagecount_is_broken.mdwn +++ b/doc/bugs/pagecount_is_broken.mdwn @@ -1 +1,3 @@ The [[plugins/pagecount]] plugin seems to be broken, as it claims there are [[!pagecount ]] pages in this wiki. (if it's not 0, the bug is fixed) + +[[fixed|done]] --[[Joey]] |