From f6e917fcce86638e2a06c48c0df714c3dd93c8b0 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 18 Jan 2007 15:06:57 +0000 Subject: * Fix handling of discussion links on discussion pages when l10n is used. --- IkiWiki/Plugin/inline.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'IkiWiki/Plugin') diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 13ff0aa19..4bdb14032 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -156,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}, "Discussion", 1, 1)); + } } if (length $config{cgiurl} && defined $type) { $template->param(have_actions => 1); -- cgit v1.2.3