]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Render.pm
bugfix
[ikiwiki.git] / IkiWiki / Render.pm
index c9ba95363a8a60b49b609a59a7617f79bb22c96f..833fcaaff0d0412ce97faca6405a406c26fd4807 100644 (file)
@@ -84,19 +84,14 @@ sub genpage ($$) {
                $template=template('page.tmpl', 
                        blind_cache => 1);
        }
-       my $actions=0;
 
+       my $actions=0;
        if (length $config{cgiurl}) {
                if (IkiWiki->can("cgi_editpage")) {
                        $template->param(editurl => cgiurl(do => "edit", page => $page));
                        $actions++;
                }
-               if (exists $hooks{auth}) {
-                       $template->param(prefsurl => cgiurl(do => "prefs"));
-                       $actions++;
-               }
        }
-               
        if (defined $config{historyurl} && length $config{historyurl}) {
                my $u=$config{historyurl};
                $u=~s/\[\[file\]\]/$pagesources{$page}/g;
@@ -111,17 +106,10 @@ sub genpage ($$) {
                        $actions++;
                }
        }
-
-       my @actions;
-       run_hooks(pageactions => sub {
-               push @actions, map { { action => $_ } } 
-                       grep { defined } shift->(page => $page);
-       });
-       $template->param(actions => \@actions);
-
-       if ($actions || @actions) {
+       if ($actions) {
                $template->param(have_actions => 1);
        }
+       templateactions($template, $page);
 
        my @backlinks=sort { $a->{page} cmp $b->{page} } backlinks($page);
        my ($backlinks, $more_backlinks);
@@ -641,7 +629,7 @@ sub render_dependent ($$$$$$$) {
                                # only consider internal files
                                # if the page explicitly depends
                                # on such files
-                               my $internal_dep=$dep =~ /internal\(/;
+                               my $internal_dep=$dep =~ /(?:internal|comment|comment_pending)\(/;
 
                                my $in=sub {
                                        my $list=shift;