diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-02 13:50:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-02 13:50:58 -0400 |
commit | f181b7fa0fe5ce41ccbd93d6e142d35f62fa4d10 (patch) | |
tree | 9e210114ce61e5a28129f0bd7aa0794ccb185f9d | |
parent | c885ec66e0ffeefb41462b87707f5e80c0ffa993 (diff) | |
download | ikiwiki-f181b7fa0fe5ce41ccbd93d6e142d35f62fa4d10.tar ikiwiki-f181b7fa0fe5ce41ccbd93d6e142d35f62fa4d10.tar.gz |
uniq list for changed hook
There can be dups when eg, adding a new internal page, apparently.
-rw-r--r-- | IkiWiki/Render.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 5b461611d..d6c1f4f4c 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -832,10 +832,10 @@ sub refresh () { run_hooks(rendered => sub { shift->(keys %rendered) }); run_hooks(change => sub { shift->(keys %rendered) }); # back-compat } - run_hooks(changes => sub { - shift->(@$new, @$changed, @$del, - @$internal_new, @$internal_changed, @$internal_del); - }); + my %all_changed = map { $_ => 1 } + @$new, @$changed, @$del, + @$internal_new, @$internal_changed, @$internal_del; + run_hooks(changes => sub { shift->(keys %all_changed) }); } sub clean_rendered { |