]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
Renamed postscan hook to indexhtml, to reflect its changed position.
[ikiwiki.git] / IkiWiki / Render.pm
index b04664e41e5a9d0157ffedddca588c3738c322b1..30e3d4199cd56b26cbf69529ca8d641d1d6ac7b2 100644 (file)
@@ -62,7 +62,7 @@ sub genpage ($$) {
        my $page=shift;
        my $content=shift;
        
-       run_hooks(postscan => sub {
+       run_hooks(indexhtml => sub {
                shift->(page => $page, content => $content);
        });
 
@@ -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);
        }
 
@@ -136,8 +143,9 @@ sub genpage ($$) {
                backlinks => $backlinks,
                more_backlinks => $more_backlinks,
                mtime => displaytime($pagemtime{$page}),
-               ctime => displaytime($pagectime{$page}),
+               ctime => displaytime($pagectime{$page}, undef, 1),
                baseurl => baseurl($page),
+               html5 => $config{html5},
        );
 
        run_hooks(pagetemplate => sub {
@@ -313,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) {
@@ -409,7 +418,7 @@ sub find_del_files ($) {
        my @del;
        my @internal_del;
 
-       foreach my $page (keys %pagectime) {
+       foreach my $page (keys %pagesources) {
                if (! $pages->{$page}) {
                        if (isinternal($page)) {
                                push @internal_del, $pagesources{$page};