From f0f52e602df1e681aa6ce18fa3976120a6c5cb56 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Dec 2007 14:49:25 -0500 Subject: * 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. --- IkiWiki/Plugin/aggregate.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'IkiWiki/Plugin') 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; } -- cgit v1.2.3