X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/8e92468eae9ac0ab8161a0c71ff6c6a0a8aef07a..e0bb9675ce349c02fce1e835b5aaa6601d4254d2:/IkiWiki/Plugin/postsparkline.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/postsparkline.pm b/IkiWiki/Plugin/postsparkline.pm index ba43561fb..d2e5c2378 100644 --- a/IkiWiki/Plugin/postsparkline.pm +++ b/IkiWiki/Plugin/postsparkline.pm @@ -50,15 +50,10 @@ 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; - } - } - - @list = sort { $params{timehash}->{$b} <=> $params{timehash}->{$a} } @list; + my @list=sort { $params{timehash}->{$b} <=> $params{timehash}->{$a} } + pagespec_match_list( + [ grep { $_ ne $params{page} } keys %pagesources], + $params{pages}, location => $params{page}); my @data=eval qq{IkiWiki::Plugin::postsparkline::formula::$formula(\\\%params, \@list)}; if ($@) {