]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/postsparkline.pm
Put old unixauth plugin under git control. Needs some serious attention.
[git.ikiwiki.info.git] / IkiWiki / Plugin / postsparkline.pm
index ba43561fbc0d5f291f3eb80163dc88c9b506effe..d2e5c23788678efb7819e10c59964bd852663e06 100644 (file)
@@ -50,15 +50,10 @@ sub preprocess (@) {
 
        add_depends($params{page}, $params{pages});
 
 
        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 ($@) {
 
        my @data=eval qq{IkiWiki::Plugin::postsparkline::formula::$formula(\\\%params, \@list)};
        if ($@) {