diff options
author | Joey Hess <joey@kitenet.net> | 2007-12-30 14:49:25 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2007-12-30 14:49:25 -0500 |
commit | f0f52e602df1e681aa6ce18fa3976120a6c5cb56 (patch) | |
tree | 29d761810374db5ddca8a108261d1c4218d32f16 /IkiWiki/Plugin | |
parent | 3e784ea8a1aeb41aa181c29b499cf76ab83dc6d0 (diff) | |
download | ikiwiki-f0f52e602df1e681aa6ce18fa3976120a6c5cb56.tar ikiwiki-f0f52e602df1e681aa6ce18fa3976120a6c5cb56.tar.gz |
* aggregate: Fix stupid mistake introduced when converting it to use
the needsbuild hook. This resulted in feeds not being removed when pages
were updated, and probably other bugs.
* aggregate: Avoid uninitialised value warning when removing a feed that
has an expired guid.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/aggregate.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 68ff6a616..13c697dcc 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -54,11 +54,11 @@ sub needsbuild (@) { #{{{ loadstate(); # if not already loaded - foreach my $page (keys %pagestate) { - if (grep { $_ eq $pagesources{$page} } @$needsbuild) { + foreach my $feed (values %feeds) { + if (grep { $_ eq $pagesources{$feed->{sourcepage}} } @$needsbuild) { # Mark all feeds originating on this page as removable; # preprocess will unmark those that still exist. - remove_feeds($page); + remove_feeds($feed->{sourcepage}); } } } # }}} @@ -182,7 +182,8 @@ sub savestate () { #{{{ } } else { - unlink pagefile($data->{page}); + unlink pagefile($data->{page}) + if exists $data->{page}; } next; } |