my $file = $pagesources{$page};
my $type = pagetype($file);
if ($config{discussion}) {
- if ($page !~ /.*\/\Q$config{discussionpage}\E$/ &&
+ if ($page !~ /.*\/\Q$config{discussionpage}\E$/i &&
(length $config{cgiurl} ||
- exists $pagesources{$page."/".$config{discussionpage}})) {
+ exists $pagesources{$page."/".lc($config{discussionpage})})) {
$template->param(have_actions => 1);
$template->param(discussionlink =>
htmllink($page,
forcesubpage => 1));
}
}
- if (length $config{cgiurl} && defined $type) {
+ if (length $config{cgiurl} &&
+ defined $type &&
+ IkiWiki->can("cgi_editpage")) {
$template->param(have_actions => 1);
$template->param(editurl => cgiurl(do => "edit", page => $page));
+
}
}