]> sipb.mit.edu Git - ikiwiki.git/commitdiff
fix pagespec_match_list handling of list parameter
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 9 Oct 2009 17:28:41 +0000 (13:28 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 9 Oct 2009 17:28:41 +0000 (13:28 -0400)
IkiWiki.pm

index 49c76c4d4cb08901b6d102bd6e466ebb9f2f8a8c..232d3e77b6a240860adfb38447dd92586a5ce22e 100644 (file)
@@ -1986,11 +1986,15 @@ sub pagespec_match_list ($$;@) {
                if $@ || ! defined $sub;
 
        my @candidates;
                if $@ || ! defined $sub;
 
        my @candidates;
-       if (exists $params{filter}) {
-               @candidates=grep { ! $params{filter}->($_) } keys %pagesources;
+       if (exists $params{list}) {
+               @candidates=exists $params{filter}
+                       ? grep { ! $params{filter}->($_) } @{$params{list}}
+                       : @{$params{list}};
        }
        else {
        }
        else {
-               @candidates=keys %pagesources;
+               @candidates=exists $params{filter}
+                       ? grep { ! $params{filter}->($_) } keys %pagesources
+                       : keys %pagesources;
        }
 
        if (defined $params{sort}) {
        }
 
        if (defined $params{sort}) {
@@ -2023,7 +2027,7 @@ sub pagespec_match_list ($$;@) {
        
        # clear params, remainder is passed to pagespec
        my $num=$params{num};
        
        # clear params, remainder is passed to pagespec
        my $num=$params{num};
-       delete @params{qw{num deptype reverse sort filter}};
+       delete @params{qw{num deptype reverse sort filter list}};
        
        my @matches;
        my $firstfail;
        
        my @matches;
        my $firstfail;