X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/35ee7e44a62f9126a83c1243b549d47cc5ca7b43..65ddd9ee21d0faa8e02b3c32dc396210d97275de:/IkiWiki/Render.pm diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 47fbe7a61..863964207 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -93,7 +93,7 @@ sub genpage ($$$) { #{{{ $template->param(historyurl => $u); $actions++; } - if ($config{discussion}) { + if ($config{discussion} && (length $config{cgiurl} || exists $links{"$page/discussion"})) { $template->param(discussionlink => htmllink($page, $page, "Discussion", 1, 1)); $actions++; } @@ -155,8 +155,8 @@ sub scan ($) { #{{{ push @links, titlepage($2); } if ($config{discussion}) { - # Discussion links are a special case since they're not in the - # text of the page, but on its template. + # Discussion links are a special case since they're + # not in the text of the page, but on its template. push @links, "$page/discussion"; } $links{$page}=\@links; @@ -218,7 +218,7 @@ sub refresh () { #{{{ no_chdir => 1, wanted => sub { $_=decode_utf8($_); - if (/$config{wiki_file_prune_regexp}/) { + if (file_pruned($_, $config{srcdir})) { $File::Find::prune=1; } elsif (! -d $_ && ! -l $_) { @@ -238,7 +238,7 @@ sub refresh () { #{{{ no_chdir => 1, wanted => sub { $_=decode_utf8($_); - if (/$config{wiki_file_prune_regexp}/) { + if (file_pruned($_, $config{underlaydir})) { $File::Find::prune=1; } elsif (! -d $_ && ! -l $_) {