]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
refactor
[ikiwiki.git] / IkiWiki / Render.pm
index cf6943e7d705c8d4fb3b9fd40f74af5d909c6897..e5ba0079b7b74706ebc1723a9206de3de3770ba1 100644 (file)
@@ -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) {