- $template->param(have_actions => 1);
- $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
+ 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));
+ }