X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b31dc8d994d1cfd179c330a729dcb8bce0b293c2..344ab0a16b749c44d6d19dbe1a179c8e30ceef31:/IkiWiki/Plugin/inline.pm?ds=inline diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 5857636de..ec1cf0970 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -5,7 +5,6 @@ package IkiWiki::Plugin::inline; use warnings; use strict; use IkiWiki 1.00; -use IkiWiki::Render; # for displaytime use URI; sub import { #{{{ @@ -157,11 +156,14 @@ sub preprocess_inline (@) { #{{{ if ($actions) { my $file = $pagesources{$page}; my $type = pagetype($file); - if ($config{discussion} && - $page !~ /.*\/discussion$/ && - (length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) { - $template->param(have_actions => 1); - $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1)); + if ($config{discussion}) { + my $discussionlink=gettext("discussion"); + if ($page !~ /.*\/\Q$discussionlink\E$/ && + (length $config{cgiurl} || + exists $links{$page."/".$discussionlink})) { + $template->param(have_actions => 1); + $template->param(discussionlink => htmllink($page, $params{page}, gettext("Discussion"), 1, 1)); + } } if (length $config{cgiurl} && defined $type) { $template->param(have_actions => 1);