Revert "pagespec_match_list * optimisation"
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 23 Apr 2009 20:35:56 +0000 (16:35 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 23 Apr 2009 20:35:56 +0000 (16:35 -0400)
This reverts commit 2f96c49bd1826ecb213ae025ad456a714aa04863.

I forgot about internal pages. We don't want * matching them!

I left the optimisation in pagecount, where it used to live.
Internal pages probably don't matter when they're just being
counted.

IkiWiki.pm
IkiWiki/Plugin/pagecount.pm

index e8c0c7abc70450e78d35b5cd04576c70eb3f9a70..e260fffea7aad7802e673541533056ad6960a118 100644 (file)
@@ -1837,8 +1837,6 @@ sub pagespec_match_list ($$;@) {
        my $spec=shift;
        my @params=@_;
 
-       return @$pages if $spec eq '*'; # optimisation
-
        my $sub=pagespec_translate($spec);
        error "syntax error in pagespec \"$spec\""
                if $@ || ! defined $sub;
index a561e58e5314519b2236686f139dbbb4bcf4b430..f8881a04bdacab3f3f086cefd29323f8463c82c5 100644 (file)
@@ -26,7 +26,9 @@ sub preprocess (@) {
        # register a dependency.
        add_depends($params{page}, $params{pages});
        
-       my @pages=pagespec_match_list([keys %pagesources], $params{pages}, location => $params{page});
+       my @pages=keys %pagesources;
+       @pages=pagespec_match_list(\@pages, $params{pages}, location => $params{page})
+               if $params{pages} ne "*"; # optimisation;
        return $#pages+1;
 }