aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/aggregate.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-09-17 14:27:31 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-09-17 14:27:31 -0400
commitb540b263debef11d305b85f4dc85a6807b782810 (patch)
tree73c658cb7cf13ae2df52d83bdda64ac5ab4c2450 /IkiWiki/Plugin/aggregate.pm
parentfa4f735ad77417bf521b140fb872b8eb1f16552a (diff)
downloadikiwiki-b540b263debef11d305b85f4dc85a6807b782810.tar
ikiwiki-b540b263debef11d305b85f4dc85a6807b782810.tar.gz
aggregate: Allow expirecount to work on the first pass. (expireage still needs to wait for the pages to be rendered though)
Diffstat (limited to 'IkiWiki/Plugin/aggregate.pm')
-rw-r--r--IkiWiki/Plugin/aggregate.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 85b398063..2f20ad2e5 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -420,10 +420,10 @@ sub expire () { #{{{
next unless $feed->{expireage} || $feed->{expirecount};
my $count=0;
my %seen;
- foreach my $item (sort { $IkiWiki::pagectime{$b->{page}} <=> $IkiWiki::pagectime{$a->{page}} }
- grep { exists $_->{page} && $_->{feed} eq $feed->{name} && $IkiWiki::pagectime{$_->{page}} }
+ foreach my $item (sort { ($IkiWiki::pagectime{$b->{page}}||0) <=> ($IkiWiki::pagectime{$a->{page}}||0) }
+ grep { exists $_->{page} && $_->{feed} eq $feed->{name} }
values %guids) {
- if ($feed->{expireage}) {
+ if ($feed->{expireage} && $IkiWiki::pagectime{$_->{page}}) {
my $days_old = (time - $IkiWiki::pagectime{$item->{page}}) / 60 / 60 / 24;
if ($days_old > $feed->{expireage}) {
debug(sprintf(gettext("expiring %s (%s days old)"),