]> sipb.mit.edu Git - ikiwiki.git/commitdiff
pagecount: Fix broken optimisation for * pagespec.
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 5 Jun 2009 22:04:39 +0000 (18:04 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 5 Jun 2009 22:04:39 +0000 (18:04 -0400)
IkiWiki/Plugin/pagecount.pm
debian/changelog
doc/bugs/pagecount_is_broken.mdwn

index 1955603b023d84315e6c9487ea095a93ca6a6afe..5a2301af49232943d4f0889c0f3b9ba28f05396f 100644 (file)
@@ -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;
 }
 
index 7d0fb5c801a2e2cee05ab4c6e4075e2f08eb2ae9..df4429326c7a0b64f4e97090ddff60d6ae23fff6 100644 (file)
@@ -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
 
index 179981855ab2a25e26a1d9c28f326d86c5edc15d..101230d9439d1d619a64992b3081d8850a3cb109 100644 (file)
@@ -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]]