diff options
author | Joey Hess <joey@kitenet.net> | 2010-09-10 17:17:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-09-10 17:17:08 -0400 |
commit | c4ebdd6f467f3361b1f444d9462e10acdbcf9322 (patch) | |
tree | 91542980462582541ca97f2da334ca71c8fa053f /IkiWiki | |
parent | 163fc34db7f29bc75a05c54b83c2a00c5ad899c2 (diff) | |
download | ikiwiki-c4ebdd6f467f3361b1f444d9462e10acdbcf9322.tar ikiwiki-c4ebdd6f467f3361b1f444d9462e10acdbcf9322.tar.gz |
Pass array of names of files that have been deleted to needsbuild hook as second parameter, to allow for plugins that needs access to this information earlier than the delete hook.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 5 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 715a3d652..20c5f3bdd 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -570,9 +570,9 @@ sub genfeed ($$$$$@) { } } + my $file=$pagesources{$p}; + my $type=pagetype($file); if ($itemtemplate->query(name => "enclosure")) { - my $file=$pagesources{$p}; - my $type=pagetype($file); if (defined $type) { $itemtemplate->param(content => $pcontent); } @@ -591,6 +591,7 @@ sub genfeed ($$$$$@) { } } else { + next unless defined $type; $itemtemplate->param(content => $pcontent); } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 0dbe9611a..7ea919abc 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -760,7 +760,7 @@ sub refresh () { my ($del, $internal_del)=find_del_files($pages); my ($changed, $internal_changed)=find_changed($files); run_hooks(needsbuild => sub { - my $ret=shift->($changed); + my $ret=shift->($changed, [@$del, @$internal_del]); $changed=$ret if ref $ret eq 'ARRAY'; }); my $oldlink_targets=calculate_old_links($changed, $del); |