summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/postsparkline.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-04-23 15:45:30 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-04-23 15:45:30 -0400
commitaa306957bac11477b914ac19b93890184ffe4062 (patch)
treec9b05bf73cb4d19e55297ad3b335bb1fc3ce67e5 /IkiWiki/Plugin/postsparkline.pm
parent527d178c12141d2467dfa86492e249d021b88997 (diff)
pagespec_match_list added and used in most appropriate places
* pagespec_match_list: New API function, matches pages in a list and throws an error if the pagespec is bad. * inline, brokenlinks, calendar, linkmap, map, orphans, pagecount, pagestate, postsparkline: Display a handy error message if the pagespec is erronious.
Diffstat (limited to 'IkiWiki/Plugin/postsparkline.pm')
-rw-r--r--IkiWiki/Plugin/postsparkline.pm10
1 files changed, 3 insertions, 7 deletions
diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm
index ba43561fb..c2ebbc5eb 100644
--- a/IkiWiki/Plugin/postsparkline.pm
+++ b/IkiWiki/Plugin/postsparkline.pm
@@ -50,13 +50,9 @@ sub preprocess (@) {
add_depends($params{page}, $params{pages});
- my @list;
- foreach my $page (keys %pagesources) {
- next if $page eq $params{page};
- if (pagespec_match($page, $params{pages}, location => $params{page})) {
- push @list, $page;
- }
- }
+ my @list=pagespec_match_list(
+ [ grep { $_ ne $params{page} } keys %pagesources],
+ $params{pages}, location => $params{page});
@list = sort { $params{timehash}->{$b} <=> $params{timehash}->{$a} } @list;