use IkiWiki;
use Encode;
-our %backlinks=();
-our $backlinks_calculated=0;
+my %backlinks;
+my $backlinks_calculated=0;
sub calculate_backlinks () {
return if $backlinks_calculated;
}
if ($config{discussion}) {
my $discussionlink=gettext("discussion");
- if ($page !~ /.*\/\Q$discussionlink\E$/ &&
+ if ($page !~ /.*\/\Q$discussionlink\E$/i &&
(length $config{cgiurl} ||
exists $links{$page."/".$discussionlink})) {
$template->param(discussionlink => htmllink($page, $page, gettext("Discussion"), noimageinline => 1, forcesubpage => 1));