From: Joey Hess Date: Fri, 9 Oct 2009 17:28:41 +0000 (-0400) Subject: fix pagespec_match_list handling of list parameter X-Git-Tag: 3.20091017~27^2~42 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/3807aa298cc3a6ad7fbb39c3ff13fd5916a5c469 fix pagespec_match_list handling of list parameter --- diff --git a/IkiWiki.pm b/IkiWiki.pm index 49c76c4d4..232d3e77b 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1986,11 +1986,15 @@ sub pagespec_match_list ($$;@) { 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 { - @candidates=keys %pagesources; + @candidates=exists $params{filter} + ? grep { ! $params{filter}->($_) } keys %pagesources + : keys %pagesources; } if (defined $params{sort}) { @@ -2023,7 +2027,7 @@ sub pagespec_match_list ($$;@) { # 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;