aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-09-07 12:08:59 -0400
committerJoey Hess <joey@kitenet.net>2010-09-07 12:08:59 -0400
commit8a6f4a7e50c247c061fd74b535d0f292aca6bda7 (patch)
tree265b285b3d8f5b33ff135531badfe2f3585e378d /IkiWiki/Render.pm
parent7475f90be2c1941d4449791e9e9cd5f3dc3bbb71 (diff)
downloadikiwiki-8a6f4a7e50c247c061fd74b535d0f292aca6bda7.tar
ikiwiki-8a6f4a7e50c247c061fd74b535d0f292aca6bda7.tar.gz
needsbuild hook interface changed; the hooks should now return the modified array of things that need built. (Backwards compatability code keeps plugins using the old interface working.)
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 9921915b4..0dbe9611a 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -759,7 +759,10 @@ sub refresh () {
my ($new, $internal_new)=find_new_files($files);
my ($del, $internal_del)=find_del_files($pages);
my ($changed, $internal_changed)=find_changed($files);
- run_hooks(needsbuild => sub { shift->($changed) });
+ run_hooks(needsbuild => sub {
+ my $ret=shift->($changed);
+ $changed=$ret if ref $ret eq 'ARRAY';
+ });
my $oldlink_targets=calculate_old_links($changed, $del);
foreach my $file (@$changed) {