X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/970373548fda77223ebbeb6aadbdbe4884b67cef..cb2025af4501b4168440bb8583f95ca5836d72ae:/IkiWiki/Render.pm diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index cf6943e7d..e5ba0079b 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -112,7 +112,14 @@ sub genpage ($$) { } } - if ($actions) { + my @actions; + run_hooks(pageactions => sub { + push @actions, map { { action => $_ } } + grep { defined } shift->(page => $page); + }); + $template->param(actions => \@actions); + + if ($actions || @actions) { $template->param(have_actions => 1); } @@ -314,6 +321,7 @@ sub find_src_files () { my ($f) = $file =~ /$config{wiki_file_regexp}/; # untaint if (! defined $f) { warn(sprintf(gettext("skipping bad filename %s"), $file)."\n"); + return; } if ($underlay) {